2021-06-13 08:48:25 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sun, 23 Sep 2018 20:59:53 -0500
|
|
|
|
Subject: [PATCH] Honor EntityAgeable.ageLock
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
2023-06-07 22:41:26 +02:00
|
|
|
index be5e603d505566feac61cc7e591d35ce483a92df..2061d7ae62c1335c87aa67fd0cc004c42e34e3a7 100644
|
2021-06-13 08:48:25 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
2023-03-14 20:24:52 +01:00
|
|
|
@@ -85,6 +85,7 @@ public abstract class AgeableMob extends PathfinderMob {
|
2021-06-13 08:48:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void ageUp(int age, boolean overGrow) {
|
2021-12-30 20:44:39 +01:00
|
|
|
+ if (this.ageLocked) return; // Paper - GH-1459
|
2021-06-13 08:48:25 +02:00
|
|
|
int j = this.getAge();
|
|
|
|
int k = j;
|
|
|
|
|
2021-12-30 20:44:39 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
2023-12-05 23:21:44 +01:00
|
|
|
index 2700f7dc650dc19da75e9351f6d558d05be80dc5..5f2042d565974a5509aec8f744e091fe7c576c98 100644
|
2021-12-30 20:44:39 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
2022-06-08 02:15:06 +02:00
|
|
|
@@ -299,6 +299,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
2021-12-30 20:44:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private static void setBeeReleaseData(int ticks, Bee bee) {
|
|
|
|
+ if (!bee.ageLocked) { // Paper - respect age lock
|
|
|
|
int j = bee.getAge();
|
|
|
|
|
|
|
|
if (j < 0) {
|
2022-06-08 02:15:06 +02:00
|
|
|
@@ -306,6 +307,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
2021-12-30 20:44:39 +01:00
|
|
|
} else if (j > 0) {
|
|
|
|
bee.setAge(Math.max(0, j - ticks));
|
|
|
|
}
|
|
|
|
+ } // Paper - respect age lock
|
|
|
|
|
|
|
|
bee.setInLoveTime(Math.max(0, bee.getInLoveTime() - ticks));
|
|
|
|
}
|