summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block/BlockSmelter.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-27 19:11:36 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-27 19:11:36 +0200
commit90c65b04bb9ddb0a5cbcfa86df4c18cc9ab3fa32 (patch)
treeeedb6ab2e2fc99244e6991612e78bd9679963647 /common/darkknight/jewelrycraft/block/BlockSmelter.java
parent974d9333835f374e78595010f32203d4a25b5118 (diff)
Fixed smelter from crashing if it has another tile entity in front of it other than a molder
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockSmelter.java')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java8
1 files changed, 4 insertions, 4 deletions
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)