diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-05 15:45:00 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-05 15:45:00 +0200 |
commit | d397dd263f121340ef4633904e3c01419786856c (patch) | |
tree | addea805f20127475b5a632efdddf1d3adb3d2f1 /source/World.cpp | |
parent | Fixed personal crafting grid not being tossed on inventory close. (diff) | |
download | cuberite-d397dd263f121340ef4633904e3c01419786856c.tar cuberite-d397dd263f121340ef4633904e3c01419786856c.tar.gz cuberite-d397dd263f121340ef4633904e3c01419786856c.tar.bz2 cuberite-d397dd263f121340ef4633904e3c01419786856c.tar.lz cuberite-d397dd263f121340ef4633904e3c01419786856c.tar.xz cuberite-d397dd263f121340ef4633904e3c01419786856c.tar.zst cuberite-d397dd263f121340ef4633904e3c01419786856c.zip |
Diffstat (limited to '')
-rw-r--r-- | source/World.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/source/World.cpp b/source/World.cpp index bef797e06..adea59c24 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -224,15 +224,17 @@ cWorld::cWorld(const AString & a_WorldName) : StorageSchema = IniFile.GetValueSet ("Storage", "Schema", StorageSchema); m_MaxCactusHeight = IniFile.GetValueSetI("Plants", "MaxCactusHeight", 3); m_MaxSugarcaneHeight = IniFile.GetValueSetI("Plants", "MaxSugarcaneHeight", 3); + m_IsCactusBonemealable = IniFile.GetValueSetB("Plants", "IsCactusBonemealable", false); + m_IsCarrotsBonemealable = IniFile.GetValueSetB("Plants", "IsCarrotsBonemealable", true); m_IsCropsBonemealable = IniFile.GetValueSetB("Plants", "IsCropsBonemealable", true); m_IsGrassBonemealable = IniFile.GetValueSetB("Plants", "IsGrassBonemealable", true); - m_IsSaplingBonemealable = IniFile.GetValueSetB("Plants", "IsSaplingBonemealable", true); m_IsMelonStemBonemealable = IniFile.GetValueSetB("Plants", "IsMelonStemBonemealable", true); m_IsMelonBonemealable = IniFile.GetValueSetB("Plants", "IsMelonBonemealable", false); + m_IsPotatoesBonemealable = IniFile.GetValueSetB("Plants", "IsPotatoesBonemealable", true); m_IsPumpkinStemBonemealable = IniFile.GetValueSetB("Plants", "IsPumpkinStemBonemealable", true); m_IsPumpkinBonemealable = IniFile.GetValueSetB("Plants", "IsPumpkinBonemealable", false); + m_IsSaplingBonemealable = IniFile.GetValueSetB("Plants", "IsSaplingBonemealable", true); m_IsSugarcaneBonemealable = IniFile.GetValueSetB("Plants", "IsSugarcaneBonemealable", false); - m_IsCactusBonemealable = IniFile.GetValueSetB("Plants", "IsCactusBonemealable", false); m_bEnabledPVP = IniFile.GetValueSetB("PVP", "Enabled", true); m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", false); @@ -879,9 +881,22 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta); switch (BlockType) { + case E_BLOCK_CARROTS: + { + if (a_IsByBonemeal && !m_IsCarrotsBonemealable) + { + return false; + } + if (BlockMeta < 7) + { + FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, 7); + } + return true; + } + case E_BLOCK_CROPS: { - if (a_IsByBonemeal && !m_IsGrassBonemealable) + if (a_IsByBonemeal && !m_IsCropsBonemealable) { return false; } @@ -913,6 +928,19 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy return true; } + case E_BLOCK_POTATOES: + { + if (a_IsByBonemeal && !m_IsPotatoesBonemealable) + { + return false; + } + if (BlockMeta < 7) + { + FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, 7); + } + return true; + } + case E_BLOCK_PUMPKIN_STEM: { if (BlockMeta < 7) |