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