Fixed Door Bug

Fixed the bug referenced in the previous commit that caused doors to
break instantly.
This commit is contained in:
SenseiKiwi
2014-03-07 22:21:34 -04:00
parent 576ac0aae2
commit 7b4d1cc2f1

View File

@@ -295,7 +295,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
{
int metadata = world.getBlockMetadata(x, y, z);
if (!isUpperDoorBlock(metadata))
if (isUpperDoorBlock(metadata))
{
if (world.getBlockId(x, y - 1, z) != this.blockID)
{
@@ -403,7 +403,6 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
// Close the door only after the entity goes through
// so players don't have it slam in their faces.
this.onPoweredBlockChange(world, x, y, z, false);
}
}
else if (world.getBlockId(x, y + 1, z) == this.blockID)
@@ -412,9 +411,6 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
}
}
@Override
public abstract int getDrops();
public static boolean isUpperDoorBlock(int metadata)
{
return (metadata & 8) != 0;