@Override public void onBlockAdded(World world, BlockPos pos, IBlockState state) { super.onBlockAdded(world, pos, state); if(!world.isRemote && world.getBlockState(pos.down()).getBlock() == Blocks.IRON_BARS && world.getBlockState(pos.down(2)).getBlock() == Blocks.IRON_BARS) { world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); world.setBlockState(pos.down(), Blocks.AIR.getDefaultState(), 2); world.setBlockState(pos.down(2), Blocks.AIR.getDefaultState(), 2); EntityBlaze blaze = new EntityBlaze(world); blaze.setLocationAndAngles(pos.getX() + 0.5D, pos.getY() - 1.95D, pos.getZ() + 0.5D, 0.0F, 0.0F); blaze.deathLootTable = LOOT_TABLE; blaze.onInitialSpawn(world.getDifficultyForLocation(pos), null); world.spawnEntity(blaze); world.notifyNeighborsOfStateChange(pos, Blocks.AIR, false); world.notifyNeighborsOfStateChange(pos.down(), Blocks.AIR, false); world.notifyNeighborsOfStateChange(pos.down(2), Blocks.AIR, false); } }