mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
dont sync please
This commit is contained in:
parent
9645d09063
commit
0b7b43fd7f
1 changed files with 29 additions and 25 deletions
|
@ -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");
|
||||
|
@ -188,4 +191,5 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue