Remove incorrect !world.isRemote check and redundant constructor, fixes #446
This commit is contained in:
@@ -31,14 +31,9 @@ public class Snare extends SpellRay {
|
||||
@Override
|
||||
protected boolean onBlockHit(World world, BlockPos pos, EnumFacing side, Vec3d hit, EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){
|
||||
|
||||
if(side == EnumFacing.UP && world.isSideSolid(pos, EnumFacing.UP)
|
||||
&& WizardryUtilities.canBlockBeReplaced(world, pos.up())){
|
||||
|
||||
if(!world.isRemote){
|
||||
world.setBlockState(pos.up(), WizardryBlocks.snare.getDefaultState());
|
||||
((TileEntityPlayerSave)world.getTileEntity(pos.up())).setCaster(caster);
|
||||
}
|
||||
|
||||
if(side == EnumFacing.UP && world.isSideSolid(pos, EnumFacing.UP) && WizardryUtilities.canBlockBeReplaced(world, pos.up())){
|
||||
world.setBlockState(pos.up(), WizardryBlocks.snare.getDefaultState());
|
||||
((TileEntityPlayerSave)world.getTileEntity(pos.up())).setCaster(caster);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,6 @@ public class TileEntityPlayerSave extends TileEntity {
|
||||
|
||||
public TileEntityPlayerSave(){}
|
||||
|
||||
public TileEntityPlayerSave(EntityLivingBase caster){
|
||||
this.casterUUID = caster.getUniqueID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound){
|
||||
super.readFromNBT(tagCompound);
|
||||
|
||||
Reference in New Issue
Block a user