@Override public void onNeighborBlockChange( World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { if (worldIn.isBlockPowered(pos)) { this.onBlockDestroyedByPlayer( worldIn, pos, state.withProperty(EXPLODE, Boolean.valueOf(true))); worldIn.setBlockToAir(pos); } }
@Override public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { super.onBlockAdded(worldIn, pos, state); if (worldIn.isBlockPowered(pos)) { this.onBlockDestroyedByPlayer( worldIn, pos, state.withProperty(EXPLODE, Boolean.valueOf(true))); worldIn.setBlockToAir(pos); } }