diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/darkknight/jewelrycraft/block/BlockDisplayer.java | 6 | ||||
| -rw-r--r-- | common/darkknight/jewelrycraft/block/BlockSmelter.java | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockDisplayer.java b/common/darkknight/jewelrycraft/block/BlockDisplayer.java index cf3a6ac..794e38c 100644 --- a/common/darkknight/jewelrycraft/block/BlockDisplayer.java +++ b/common/darkknight/jewelrycraft/block/BlockDisplayer.java @@ -101,12 +101,12 @@ public class BlockDisplayer extends BlockContainer { if(player.isSneaking()) { - if(te.quantity > 64) + if(te.quantity > te.object.getMaxStackSize()) { - te.object.stackSize = 63; + te.object.stackSize = te.object.getMaxStackSize() - 1; player.inventory.addItemStackToInventory(te.object); te.object.stackSize = 1; - te.quantity -= 64; + te.quantity -= te.object.getMaxStackSize(); } else { diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java index 8716041..79fe7d6 100644 --- a/common/darkknight/jewelrycraft/block/BlockSmelter.java +++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java @@ -105,13 +105,13 @@ public class BlockSmelter extends BlockContainer { TileEntitySmelter te = (TileEntitySmelter) world.getBlockTileEntity(i, j, k); TileEntityMolder me = null; - if (world.getBlockMetadata(i, j, k) == 0) + if (world.getBlockMetadata(i, j, k) == 0 && world.getBlockTileEntity(i, j, k - 1) != null && world.getBlockTileEntity(i, j, k - 1) instanceof TileEntityMolder) me = (TileEntityMolder) world.getBlockTileEntity(i, j, k - 1); - else if (world.getBlockMetadata(i, j, k) == 1) + else if (world.getBlockMetadata(i, j, k) == 1 && world.getBlockTileEntity(i + 1, j, k) != null && world.getBlockTileEntity(i + 1, j, k) instanceof TileEntityMolder) me = (TileEntityMolder) world.getBlockTileEntity(i + 1, j, k); - else if (world.getBlockMetadata(i, j, k) == 2) + else if (world.getBlockMetadata(i, j, k) == 2 && world.getBlockTileEntity(i, j, k + 1) != null && world.getBlockTileEntity(i, j, k + 1) instanceof TileEntityMolder) me = (TileEntityMolder) world.getBlockTileEntity(i, j, k + 1); - else if (world.getBlockMetadata(i, j, k) == 3) + else if (world.getBlockMetadata(i, j, k) == 3 && world.getBlockTileEntity(i - 1, j, k) != null && world.getBlockTileEntity(i - 1, j, k) instanceof TileEntityMolder) me = (TileEntityMolder) world.getBlockTileEntity(i - 1, j, k); if (te != null && me != null && !world.isRemote) |
