mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
Persist locking of an animal's age to disk
This commit is contained in:
parent
94231f1ecf
commit
3b46222c54
@ -149,12 +149,14 @@ public abstract class EntityAnimal extends EntityCreature implements IAnimal {
|
|||||||
super.b(nbttagcompound);
|
super.b(nbttagcompound);
|
||||||
nbttagcompound.setInt("Age", this.getAge());
|
nbttagcompound.setInt("Age", this.getAge());
|
||||||
nbttagcompound.setInt("InLove", this.love);
|
nbttagcompound.setInt("InLove", this.love);
|
||||||
|
nbttagcompound.setBoolean("AgeLocked", this.ageLocked); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(NBTTagCompound nbttagcompound) {
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
super.a(nbttagcompound);
|
super.a(nbttagcompound);
|
||||||
this.setAge(nbttagcompound.getInt("Age"));
|
this.setAge(nbttagcompound.getInt("Age"));
|
||||||
this.love = nbttagcompound.getInt("InLove");
|
this.love = nbttagcompound.getInt("InLove");
|
||||||
|
this.ageLocked = nbttagcompound.getBoolean("AgeLocked"); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Entity findTarget() {
|
protected Entity findTarget() {
|
||||||
|
Loading…
Reference in New Issue
Block a user