Stop nuke's exploding when broken
This commit is contained in:
parent
65a64e650b
commit
f532ce15c0
1 changed files with 2 additions and 7 deletions
|
@ -67,7 +67,7 @@ public class BlockNuke extends BaseBlock implements ITexturedBlock {
|
|||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
|
||||
super.onBlockAdded(worldIn, pos, state);
|
||||
if (worldIn.isBlockPowered(pos)) {
|
||||
this.onBlockDestroyedByPlayer(worldIn, pos, state);
|
||||
this.explode(worldIn, pos, state, null););
|
||||
worldIn.setBlockToAir(pos);
|
||||
}
|
||||
}
|
||||
|
@ -77,16 +77,11 @@ public class BlockNuke extends BaseBlock implements ITexturedBlock {
|
|||
*/
|
||||
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
|
||||
if (worldIn.isBlockPowered(pos)) {
|
||||
this.onBlockDestroyedByPlayer(worldIn, pos, state);
|
||||
this.explode(worldIn, pos, state, null);
|
||||
worldIn.setBlockToAir(pos);
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
this.explode(worldIn, pos, state, (EntityLivingBase)null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return false; //No flint and steel
|
||||
|
|
Loading…
Reference in a new issue