diff options
author | Masy98 <masy@antheruscraft.de> | 2014-12-18 19:32:48 +0100 |
---|---|---|
committer | Masy98 <masy@antheruscraft.de> | 2014-12-18 19:32:48 +0100 |
commit | 706b9181e612410ea99c9d725d3cd448dafb152c (patch) | |
tree | 0d1281525b92566409a3c4a6d0bf8a0e9d5f7dc8 /src/World.cpp | |
parent | Added Entity Guardian (diff) | |
parent | Merge pull request #1679 from SphinxC0re/master (diff) | |
download | cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar.gz cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar.bz2 cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar.lz cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar.xz cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.tar.zst cuberite-706b9181e612410ea99c9d725d3cd448dafb152c.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 99701e11b..b3d34b48c 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) { |