diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-12-17 17:33:30 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-12-17 17:33:30 +0100 |
commit | 6ee7fd3c6792235c873e24b16331e3a8278021cc (patch) | |
tree | 707fb63ebda192bad5603c5c280d99746b510cc4 /src/World.cpp | |
parent | Implemented vanilla-like shift click. (diff) | |
parent | Merge pull request #1674 from gushromp/master (diff) | |
download | cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar.gz cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar.bz2 cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar.lz cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar.xz cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.tar.zst cuberite-6ee7fd3c6792235c873e24b16331e3a8278021cc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp index 1bee6e344..69b39f831 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1520,7 +1520,21 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy } return true; } - + + case E_BLOCK_COCOA_POD: + { + NIBBLETYPE TypeMeta = BlockMeta & 0x03; + int GrowState = BlockMeta >> 2; + + if (GrowState < 2) + { + GrowState++; + FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, BlockType, (NIBBLETYPE) (GrowState << 2 | TypeMeta)); + BroadcastSoundParticleEffect(2005, a_BlockX, a_BlockY, a_BlockZ, 0); + } + return true; + } + case E_BLOCK_CROPS: { if (a_IsByBonemeal && !m_IsCropsBonemealable) @@ -3280,7 +3294,6 @@ int cWorld::SpawnMobFinalize(cMonster * a_Monster) return -1; } - BroadcastSpawnEntity(*a_Monster); cPluginManager::Get()->CallHookSpawnedMonster(*this, *a_Monster); return a_Monster->GetUniqueID(); @@ -3373,7 +3386,7 @@ void cWorld::SetChunkAlwaysTicked(int a_ChunkX, int a_ChunkZ, bool a_AlwaysTicke -cRedstoneSimulator<cChunk, cWorld> * cWorld::InitializeRedstoneSimulator(cIniFile & a_IniFile) +cRedstoneSimulator * cWorld::InitializeRedstoneSimulator(cIniFile & a_IniFile) { AString SimulatorName = a_IniFile.GetValueSet("Physics", "RedstoneSimulator", "Incremental"); @@ -3383,11 +3396,11 @@ cRedstoneSimulator<cChunk, cWorld> * cWorld::InitializeRedstoneSimulator(cIniFil SimulatorName = "Incremental"; } - cRedstoneSimulator<cChunk, cWorld> * res = nullptr; + cRedstoneSimulator * res = nullptr; if (NoCaseCompare(SimulatorName, "Incremental") == 0) { - res = MakeIncrementalRedstoneSimulator(*this); + res = new cIncrementalRedstoneSimulator(*this); } else if (NoCaseCompare(SimulatorName, "noop") == 0) { |