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

@@ -82,7 +82,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
if (isUpperDoorBlock(metadata)) if (isUpperDoorBlock(metadata))
{ {
world.setBlockMetadataWithNotify(x, y - 1, z, lowMeta,2); world.setBlockMetadataWithNotify(x, y - 1, z, lowMeta, 2);
world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z); world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z);
} }
else else
@@ -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) public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID)
{ {
int metadata = world.getBlockMetadata(x, y, z); int metadata = world.getBlockMetadata(x, y, z);
if (!isUpperDoorBlock(metadata)) if (isUpperDoorBlock(metadata))
{ {
if (world.getBlockId(x, y - 1, z) != this.blockID) 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 // Close the door only after the entity goes through
// so players don't have it slam in their faces. // so players don't have it slam in their faces.
this.onPoweredBlockChange(world, x, y, z, false); this.onPoweredBlockChange(world, x, y, z, false);
} }
} }
else if (world.getBlockId(x, y + 1, z) == this.blockID) 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) public static boolean isUpperDoorBlock(int metadata)
{ {
return (metadata & 8) != 0; return (metadata & 8) != 0;