Skip to content

Commit

Permalink
drawbridge stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 30, 2014
1 parent 7701ad7 commit 14b4e8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -428,8 +428,8 @@ public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world,

if (world.func_147439_a(x, y, z) == block)
{
block.onBlockPlacedBy(world, x, y, z, player, stack);
block.onPostBlockPlaced(world, x, y, z, metadata);
block.func_149689_a(world, x, y, z, player, stack);
block.func_149714_e(world, x, y, z, metadata);
}

return true;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/tmechworks/blocks/logic/DrawbridgeLogic.java
Expand Up @@ -300,11 +300,11 @@ public void updateEntity ()
}

Block block = field_145850_b.func_147439_a(xPos, yPos, zPos);
if (block == null || block.isAirBlock(field_145850_b, xPos, yPos, zPos) || block.isBlockReplaceable(field_145850_b, xPos, yPos, zPos))
if (block == null || WorldHelper.isAirBlock(field_145850_b, xPos, yPos, zPos) || block.isBlockReplaceable(field_145850_b, xPos, yPos, zPos))
{
//tryExtend(field_145850_b, xPos, yPos, zPos, direction);
int blockToItem = TMechworksRegistry.blockToItemMapping.get(bufferStack.getItem());
if (blockToItem == 0)
Item blockToItem = TMechworksRegistry.blockToItemMapping.get(bufferStack.getItem());
if (blockToItem == null)
{
if (BlockUtils.getBlockFromItem(inventory[0].getItem()) == null)
return;
Expand Down Expand Up @@ -413,8 +413,8 @@ public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world,

if (world.func_147439_a(x, y, z) == block)
{
block.onBlockPlacedBy(world, x, y, z, player, stack);
block.onPostBlockPlaced(world, x, y, z, metadata);
block.func_149689_a(world, x, y, z, player, stack);
block.func_149714_e(world, x, y, z, metadata);
}

return true;
Expand Down

0 comments on commit 14b4e8a

Please sign in to comment.