summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortonibm19 <tonibm19@gmail.com>2013-12-23 10:26:45 +0100
committertonibm19 <tonibm19@gmail.com>2013-12-23 10:26:45 +0100
commitb95ee2d230ee25f02ac86589da2e8b9f723981bf (patch)
tree688d15abbd3dba40f225712a9ce9d55535980152 /src
parentFixed bug where snowgolems could replace non-solid blocks to snow blocks. (diff)
downloadcuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar.gz
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar.bz2
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar.lz
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar.xz
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.tar.zst
cuberite-b95ee2d230ee25f02ac86589da2e8b9f723981bf.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPumpkin.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/Blocks/BlockPumpkin.h b/src/Blocks/BlockPumpkin.h
index cb78400cb..20a6fef5c 100644
--- a/src/Blocks/BlockPumpkin.h
+++ b/src/Blocks/BlockPumpkin.h
@@ -22,11 +22,28 @@ public:
a_World->GetBlock(a_BlockX, a_BlockY - 2, a_BlockZ) == E_BLOCK_SNOW_BLOCK
)
{
- a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
- a_World->SetBlock(a_BlockX, a_BlockY - 1, a_BlockZ, E_BLOCK_AIR, 0);
- a_World->SetBlock(a_BlockX, a_BlockY - 2, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 1, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 2, a_BlockZ, E_BLOCK_AIR, 0);
a_World->SpawnMob(a_BlockX + 0.5, a_BlockY - 2, a_BlockZ + 0.5, cMonster::mtSnowGolem);
}
+ if
+ (
+ a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ) == E_BLOCK_IRON_BLOCK &&
+ (a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ + 1) == E_BLOCK_IRON_BLOCK) || (a_World->GetBlock(a_BlockX + 1, a_BlockY - 1, a_BlockZ) == E_BLOCK_IRON_BLOCK) &&
+ (a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ - 1) == E_BLOCK_IRON_BLOCK) || (a_World->GetBlock(a_BlockX - 1, a_BlockY - 1, a_BlockZ) == E_BLOCK_IRON_BLOCK) &&
+ a_World->GetBlock(a_BlockX, a_BlockY - 2, a_BlockZ) == E_BLOCK_IRON_BLOCK
+ )
+ {
+ a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 1, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 1, a_BlockZ + 1, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 1, a_BlockZ - 1, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX + 1, a_BlockY - 1, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX - 1, a_BlockY - 1, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->FastSetBlock(a_BlockX, a_BlockY - 2, a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->SpawnMob(a_BlockX + 0.5, a_BlockY - 2, a_BlockZ + 0.5, cMonster::mtIronGolem);
+ }
}
virtual bool GetPlacementBlockTypeMeta(