Move setBlockState call inside !world.isRemote check, fixes #216

This commit is contained in:
Electroblob77
2019-09-02 15:51:44 +01:00
parent 99887f95e2
commit ebe64b06e3
@@ -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);