aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch
new file mode 100644
index 0000000000..a615763ef4
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/AgeableMob.java.patch
@@ -0,0 +1,49 @@
+--- a/net/minecraft/world/entity/AgeableMob.java
++++ b/net/minecraft/world/entity/AgeableMob.java
+@@ -20,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);
+@@ -101,19 +100,19 @@
+ }
+
+ @Override
+- @Override
+- public void addAdditionalSaveData(CompoundTag compoundtag) {
+- super.addAdditionalSaveData(compoundtag);
+- compoundtag.putInt("Age", this.getAge());
+- compoundtag.putInt("ForcedAge", this.forcedAge);
++ public void addAdditionalSaveData(CompoundTag compound) {
++ super.addAdditionalSaveData(compound);
++ compound.putInt("Age", this.getAge());
++ compound.putInt("ForcedAge", this.forcedAge);
++ compound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit
+ }
+
+ @Override
+- @Override
+- public void readAdditionalSaveData(CompoundTag compoundtag) {
+- super.readAdditionalSaveData(compoundtag);
+- this.setAge(compoundtag.getInt("Age"));
+- this.forcedAge = compoundtag.getInt("ForcedAge");
++ public void readAdditionalSaveData(CompoundTag compound) {
++ super.readAdditionalSaveData(compound);
++ this.setAge(compound.getInt("Age"));
++ this.forcedAge = compound.getInt("ForcedAge");
++ this.ageLocked = compound.getBoolean("AgeLocked"); // CraftBukkit
+ }
+
+ @Override
+@@ -130,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.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);