summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-30 20:04:49 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-30 20:04:49 +0200
commit83973520c8492225e5ea02ebfd0a5d47b7e35f85 (patch)
tree74f0a247304d40bb528bf5200e64876b75055bc9
parentFixed 1.8 doors. (diff)
downloadcuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar.gz
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar.bz2
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar.lz
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar.xz
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.tar.zst
cuberite-83973520c8492225e5ea02ebfd0a5d47b7e35f85.zip
Diffstat (limited to '')
-rw-r--r--src/BlockInfo.cpp1
-rw-r--r--src/Blocks/BlockTrapdoor.h5
-rw-r--r--src/Simulator/SandSimulator.cpp1
-rw-r--r--src/World.cpp4
4 files changed, 9 insertions, 2 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp
index 14e814084..719ba0550 100644
--- a/src/BlockInfo.cpp
+++ b/src/BlockInfo.cpp
@@ -329,6 +329,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE].m_PistonBreakable = true;
a_Info[E_BLOCK_INACTIVE_COMPARATOR ].m_PistonBreakable = true;
a_Info[E_BLOCK_IRON_DOOR ].m_PistonBreakable = true;
+ a_Info[E_BLOCK_IRON_TRAPDOOR ].m_PistonBreakable = true;
a_Info[E_BLOCK_JACK_O_LANTERN ].m_PistonBreakable = true;
a_Info[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE].m_PistonBreakable = true;
a_Info[E_BLOCK_LILY_PAD ].m_PistonBreakable = true;
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index 41256ae55..d3f3c9a38 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -29,6 +29,11 @@ public:
virtual void OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
{
+ if (m_BlockType == E_BLOCK_IRON_TRAPDOOR)
+ {
+ return;
+ }
+
// Flip the ON bit on/off using the XOR bitwise operation
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x04);
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp
index e8887ce59..aad41e463 100644
--- a/src/Simulator/SandSimulator.cpp
+++ b/src/Simulator/SandSimulator.cpp
@@ -160,6 +160,7 @@ bool cSandSimulator::CanContinueFallThrough(BLOCKTYPE a_BlockType)
case E_BLOCK_FIRE:
case E_BLOCK_FLOWER_POT:
case E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE:
+ case E_BLOCK_IRON_TRAPDOOR:
case E_BLOCK_LAVA:
case E_BLOCK_LEVER:
case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE:
diff --git a/src/World.cpp b/src/World.cpp
index 6059b841f..a3c804b44 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -2954,7 +2954,7 @@ bool cWorld::IsTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ)
BLOCKTYPE Block;
NIBBLETYPE Meta;
GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, Block, Meta);
- if (Block != E_BLOCK_TRAPDOOR)
+ if ((Block != E_BLOCK_TRAPDOOR) && (Block != E_BLOCK_IRON_TRAPDOOR))
{
return false;
}
@@ -2971,7 +2971,7 @@ bool cWorld::SetTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_Op
BLOCKTYPE Block;
NIBBLETYPE Meta;
GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, Block, Meta);
- if (Block != E_BLOCK_TRAPDOOR)
+ if ((Block != E_BLOCK_TRAPDOOR) && (Block != E_BLOCK_IRON_TRAPDOOR))
{
return false;
}