summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortonibm19 <tonibm19@gmail.com>2013-12-23 12:00:08 +0100
committertonibm19 <tonibm19@gmail.com>2013-12-23 12:00:08 +0100
commit99ade2fa12bd67058926dfa7d6ca6c11d4fadb99 (patch)
tree0cde1b6fd086ca33320e3a59f1c6cfaebb6d2e5d
parentSome fixes (SEE DESC) (diff)
downloadcuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar.gz
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar.bz2
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar.lz
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar.xz
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.tar.zst
cuberite-99ade2fa12bd67058926dfa7d6ca6c11d4fadb99.zip
-rw-r--r--src/Blocks/BlockPumpkin.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Blocks/BlockPumpkin.h b/src/Blocks/BlockPumpkin.h
index 20a6fef5c..7aecad1e0 100644
--- a/src/Blocks/BlockPumpkin.h
+++ b/src/Blocks/BlockPumpkin.h
@@ -30,8 +30,8 @@ public:
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 - 1, a_BlockZ + 1) == E_BLOCK_IRON_BLOCK &&
+ a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ - 1) == E_BLOCK_IRON_BLOCK &&
a_World->GetBlock(a_BlockX, a_BlockY - 2, a_BlockZ) == E_BLOCK_IRON_BLOCK
)
{
@@ -39,11 +39,24 @@ public:
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, 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);
+ }
+ else if
+ (
+ a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ) == E_BLOCK_IRON_BLOCK &&
+ a_World->GetBlock(a_BlockX + 1, a_BlockY - 1, a_BlockZ) == 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 + 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(