Fixed iron trapdoors
This commit is contained in:
parent
5111628ba5
commit
83973520c8
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user