Move setBlockState call inside !world.isRemote check, fixes #216
This commit is contained in:
@@ -142,12 +142,17 @@ public class TileEntityShrineCore extends TileEntity implements ITickable {
|
||||
double z = this.pos.getZ() + 0.5;
|
||||
|
||||
if(!world.isRemote){
|
||||
|
||||
WizardryPacketHandler.net.sendToAllAround(new PacketConquerShrine.Message(this.pos),
|
||||
new NetworkRegistry.TargetPoint(this.world.provider.getDimension(), x, y, z, 64));
|
||||
}
|
||||
|
||||
world.setBlockState(pos, WizardryBlocks.runestone_pedestal.getDefaultState()
|
||||
.withProperty(BlockPedestal.ELEMENT, world.getBlockState(pos).getValue(BlockPedestal.ELEMENT)));
|
||||
if(world.getBlockState(pos).getBlock() == WizardryBlocks.runestone_pedestal){
|
||||
world.setBlockState(pos, WizardryBlocks.runestone_pedestal.getDefaultState()
|
||||
.withProperty(BlockPedestal.ELEMENT, world.getBlockState(pos).getValue(BlockPedestal.ELEMENT)));
|
||||
}else{
|
||||
Wizardry.logger.warn("What's going on?! A shrine core is being conquered but the block at its position is not a runestone pedestal!");
|
||||
}
|
||||
}
|
||||
|
||||
world.markTileEntityForRemoval(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user