Move !world.isRemote check to just the block breaking, potentially fixes #359
This commit is contained in:
@@ -54,7 +54,8 @@ public class BlockSnare extends Block implements ITileEntityProvider {
|
|||||||
@Override
|
@Override
|
||||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity){
|
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity){
|
||||||
|
|
||||||
if(!world.isRemote && entity instanceof EntityLivingBase){
|
if(entity instanceof EntityLivingBase){
|
||||||
|
|
||||||
if(world.getTileEntity(pos) instanceof TileEntityPlayerSave){
|
if(world.getTileEntity(pos) instanceof TileEntityPlayerSave){
|
||||||
|
|
||||||
TileEntityPlayerSave tileentity = (TileEntityPlayerSave)world.getTileEntity(pos);
|
TileEntityPlayerSave tileentity = (TileEntityPlayerSave)world.getTileEntity(pos);
|
||||||
@@ -68,7 +69,7 @@ public class BlockSnare extends Block implements ITileEntityProvider {
|
|||||||
Spells.snare.getProperty(Spell.EFFECT_DURATION).intValue(),
|
Spells.snare.getProperty(Spell.EFFECT_DURATION).intValue(),
|
||||||
Spells.snare.getProperty(Spell.EFFECT_STRENGTH).intValue()));
|
Spells.snare.getProperty(Spell.EFFECT_STRENGTH).intValue()));
|
||||||
|
|
||||||
world.destroyBlock(pos, false);
|
if(!world.isRemote) world.destroyBlock(pos, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user