Some migration for Nuke
This commit is contained in:
parent
bd00135137
commit
46fb0ede7a
1 changed files with 8 additions and 8 deletions
|
@ -79,26 +79,26 @@ public class BlockNuke extends BaseBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
|
public void onEntityCollision(IBlockState state, World worldIn, BlockPos pos, Entity entityIn) {
|
||||||
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
|
if (!worldIn.isRemote && entityIn instanceof EntityArrow) {
|
||||||
EntityArrow entityarrow = (EntityArrow) entityIn;
|
EntityArrow entityarrow = (EntityArrow) entityIn;
|
||||||
EntityLivingBase shooter = null;
|
EntityLivingBase shooter = null;
|
||||||
if (entityarrow.shootingEntity instanceof EntityLivingBase) {
|
if (entityarrow.func_212360_k() instanceof EntityLivingBase) {
|
||||||
shooter = (EntityLivingBase) entityarrow.shootingEntity;
|
shooter = (EntityLivingBase) entityarrow.func_212360_k();
|
||||||
}
|
}
|
||||||
if (entityarrow.isBurning()) {
|
if (entityarrow.isBurning()) {
|
||||||
ignite(worldIn, pos, state, shooter);
|
ignite(worldIn, pos, state, shooter);
|
||||||
worldIn.setBlockToAir(pos);
|
worldIn.removeBlock(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
|
public void onBlockAdded(IBlockState state, World worldIn, BlockPos pos, IBlockState oldState) {
|
||||||
super.onBlockAdded(worldIn, pos, state);
|
super.onBlockAdded(state, worldIn, pos, oldState);
|
||||||
if (worldIn.isBlockPowered(pos)) {
|
if (worldIn.isBlockPowered(pos)) {
|
||||||
ignite(worldIn, pos, state, null);
|
ignite(worldIn, pos, state, null);
|
||||||
worldIn.setBlockToAir(pos);
|
worldIn.removeBlock(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class BlockNuke extends BaseBlock {
|
||||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos p_189540_5_) {
|
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos p_189540_5_) {
|
||||||
if (worldIn.isBlockPowered(pos)) {
|
if (worldIn.isBlockPowered(pos)) {
|
||||||
ignite(worldIn, pos, state, null);
|
ignite(worldIn, pos, state, null);
|
||||||
worldIn.setBlockToAir(pos);
|
worldIn.removeBlock(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue