dont sync please

This commit is contained in:
Ellpeck 2018-10-16 18:08:32 +02:00
parent 9645d09063
commit 0b7b43fd7f

View file

@ -149,6 +149,7 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
super.writeNBT(compound, syncing); super.writeNBT(compound, syncing);
compound.setTag("item", this.stack.writeToNBT(new NBTTagCompound())); compound.setTag("item", this.stack.writeToNBT(new NBTTagCompound()));
if (!syncing) {
if (this.ritualPos != null && this.involvedStands != null && this.output != null && this.totalTime > 0) { if (this.ritualPos != null && this.involvedStands != null && this.output != null && this.totalTime > 0) {
compound.setLong("ritual_pos", this.ritualPos.toLong()); compound.setLong("ritual_pos", this.ritualPos.toLong());
compound.setInteger("timer", this.timer); compound.setInteger("timer", this.timer);
@ -165,12 +166,14 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
compound.setTag("stands", list); compound.setTag("stands", list);
} }
} }
}
@Override @Override
public void readNBT(NBTTagCompound compound, boolean syncing) { public void readNBT(NBTTagCompound compound, boolean syncing) {
super.readNBT(compound, syncing); super.readNBT(compound, syncing);
this.stack = new ItemStack(compound.getCompoundTag("item")); this.stack = new ItemStack(compound.getCompoundTag("item"));
if (!syncing) {
if (compound.hasKey("ritual_pos") && compound.hasKey("stands") && compound.hasKey("output") && compound.hasKey("total_time")) { if (compound.hasKey("ritual_pos") && compound.hasKey("stands") && compound.hasKey("output") && compound.hasKey("total_time")) {
this.ritualPos = BlockPos.fromLong(compound.getLong("ritual_pos")); this.ritualPos = BlockPos.fromLong(compound.getLong("ritual_pos"));
this.timer = compound.getInteger("timer"); this.timer = compound.getInteger("timer");
@ -188,4 +191,5 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
} }
} }
} }
}
} }