mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +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);
|
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 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue