From 8075cb0b9e8c7a8768c7940fcd1fd3d2d48625e7 Mon Sep 17 00:00:00 2001 From: squeek Date: Tue, 15 Apr 2014 21:09:33 -0700 Subject: [PATCH] Safer tile entity casting in SearedBlock.getCollisionBoundingBoxFromPool Fixes SlimeKnights/TinkersConstruct#586 and SlimeKnights/TinkersConstruct#557 Conflicts: src/main/java/tconstruct/smeltery/blocks/SearedBlock.java --- src/main/java/tconstruct/smeltery/blocks/SearedBlock.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java index 7de39cd0307..a45317a9042 100644 --- a/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java +++ b/src/main/java/tconstruct/smeltery/blocks/SearedBlock.java @@ -320,9 +320,10 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, } else { - FaucetLogic logic = (FaucetLogic) world.getTileEntity(x, y, z); - if (logic != null) + TileEntity tile = world.getBlockTileEntity(x, y, z); + if (tile != null && tile instanceof FaucetLogic) { + FaucetLogic logic = (FaucetLogic) tile; float xMin = 0.25F; float xMax = 0.75F; float zMin = 0.25F;