diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/entity/EntityAgeable.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/entity/EntityAgeable.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/entity/EntityAgeable.patch b/patch-remap/og/net/minecraft/world/entity/EntityAgeable.patch new file mode 100644 index 0000000000..b5e1154ce9 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/entity/EntityAgeable.patch @@ -0,0 +1,35 @@ +--- a/net/minecraft/world/entity/EntityAgeable.java ++++ b/net/minecraft/world/entity/EntityAgeable.java +@@ -20,6 +20,7 @@ + protected int age; + protected int forcedAge; + protected int forcedAgeTimer; ++ public boolean ageLocked; // CraftBukkit + + protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) { + super(entitytypes, world); +@@ -103,6 +104,7 @@ + super.addAdditionalSaveData(nbttagcompound); + nbttagcompound.putInt("Age", this.getAge()); + nbttagcompound.putInt("ForcedAge", this.forcedAge); ++ nbttagcompound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit + } + + @Override +@@ -110,6 +112,7 @@ + super.readAdditionalSaveData(nbttagcompound); + this.setAge(nbttagcompound.getInt("Age")); + this.forcedAge = nbttagcompound.getInt("ForcedAge"); ++ this.ageLocked = nbttagcompound.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(Particles.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D); |