36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
--- a/net/minecraft/world/entity/EntityAgeable.java
|
|
+++ b/net/minecraft/world/entity/EntityAgeable.java
|
|
@@ -23,6 +23,7 @@
|
|
protected int age = 0;
|
|
protected int forcedAge = 0;
|
|
protected int forcedAgeTimer;
|
|
+ public boolean ageLocked; // CraftBukkit
|
|
|
|
protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
|
|
super(entitytypes, world);
|
|
@@ -106,6 +107,7 @@
|
|
super.addAdditionalSaveData(nbttagcompound);
|
|
nbttagcompound.putInt("Age", this.getAge());
|
|
nbttagcompound.putInt("ForcedAge", this.forcedAge);
|
|
+ nbttagcompound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit
|
|
}
|
|
|
|
@Override
|
|
@@ -113,6 +115,7 @@
|
|
super.readAdditionalSaveData(nbttagcompound);
|
|
this.setAge(nbttagcompound.getIntOr("Age", 0));
|
|
this.forcedAge = nbttagcompound.getIntOr("ForcedAge", 0);
|
|
+ this.ageLocked = nbttagcompound.getBooleanOr("AgeLocked", this.ageLocked); // CraftBukkit
|
|
}
|
|
|
|
@Override
|
|
@@ -127,7 +130,7 @@
|
|
@Override
|
|
public void aiStep() {
|
|
super.aiStep();
|
|
- if (this.level().isClientSide) {
|
|
+ if (this.level().isClientSide || ageLocked) { // CraftBukkit
|
|
if (this.forcedAgeTimer > 0) {
|
|
if (this.forcedAgeTimer % 4 == 0) {
|
|
this.level().addParticle(Particles.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);
|