diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch new file mode 100644 index 0000000000..2b255ec379 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/entity/AgeableMob.java ++++ b/net/minecraft/world/entity/AgeableMob.java +@@ -19,6 +20,7 @@ + protected int age; + protected int forcedAge; + protected int forcedAgeTimer; ++ public boolean ageLocked; // CraftBukkit + + protected AgeableMob(EntityType<? extends AgeableMob> entityType, Level level) { + super(entityType, level); +@@ -103,6 +104,7 @@ + super.addAdditionalSaveData(compound); + compound.putInt("Age", this.getAge()); + compound.putInt("ForcedAge", this.forcedAge); ++ compound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit + } + + @Override +@@ -110,6 +112,7 @@ + super.readAdditionalSaveData(compound); + this.setAge(compound.getInt("Age")); + this.forcedAge = compound.getInt("ForcedAge"); ++ this.ageLocked = compound.getBoolean("AgeLocked"); // CraftBukkit + } + + @Override +@@ -124,7 +127,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(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0), this.getRandomY() + 0.5, this.getRandomZ(1.0), 0.0, 0.0, 0.0); |