mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
ensure TileLightNode instance at breakBlock (#181)
This commit is contained in:
1 parent
e12142890e
commit
4558f194be
1 file changed
+5
-3
@@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -56,9 +57,10 @@ public class BlockLightNode extends BlockEio {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
|
||||
TileLightNode te = (TileLightNode) world.getTileEntity(x, y, z);
|
||||
if (te != null) {
|
||||
te.onBlockRemoved();
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if (te instanceof TileLightNode) {
|
||||
TileLightNode light = (TileLightNode) te;
|
||||
light.onBlockRemoved();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user