diff --git a/src/main/java/tconstruct/client/ToolCoreRenderer.java b/src/main/java/tconstruct/client/ToolCoreRenderer.java index 67b12103..9124aa8b 100644 --- a/src/main/java/tconstruct/client/ToolCoreRenderer.java +++ b/src/main/java/tconstruct/client/ToolCoreRenderer.java @@ -24,6 +24,9 @@ public class ToolCoreRenderer implements IItemRenderer @Override public boolean handleRenderType (ItemStack item, ItemRenderType type) { + if(!item.hasTagCompound()) + return false; + switch (type) { case ENTITY: diff --git a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java index 9bf0375f..844bd260 100644 --- a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java +++ b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java @@ -278,30 +278,34 @@ public class SearedBlock extends InventoryBlock } else { - FaucetLogic logic = (FaucetLogic) world.getTileEntity(x, y, z); + TileEntity te = world.getTileEntity(x, y, z); float xMin = 0.25F; float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F; - switch (logic.getRenderDirection()) + if(te instanceof FaucetLogic) { - case 2: - zMin = 0.625F; - zMax = 1.0F; - break; - case 3: - zMax = 0.375F; - zMin = 0F; - break; - case 4: - xMin = 0.625F; - xMax = 1.0F; - break; - case 5: - xMax = 0.375F; - xMin = 0F; - break; + FaucetLogic logic = (FaucetLogic) te; + switch (logic.getRenderDirection()) + { + case 2: + zMin = 0.625F; + zMax = 1.0F; + break; + case 3: + zMax = 0.375F; + zMin = 0F; + break; + case 4: + xMin = 0.625F; + xMax = 1.0F; + break; + case 5: + xMax = 0.375F; + xMin = 0F; + break; + } } this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax); diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java index 650f8ba6..be4f55b9 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java @@ -307,6 +307,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci void detectEntities () { + if(centerPos == null) + return; + AxisAlignedBB box = AxisAlignedBB.getBoundingBox(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D); List list = worldObj.getEntitiesWithinAABB(Entity.class, box);