mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
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
|
|
index be5e603d505566feac61cc7e591d35ce483a92df..8dcdc664470fcac00c203b9499ea0a45df7d86ef 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
@@ -85,6 +85,7 @@ public abstract class AgeableMob extends PathfinderMob {
|
|
}
|
|
|
|
public void ageUp(int age, boolean overGrow) {
|
|
+ if (this.ageLocked) return; // Paper - Honor ageLock
|
|
int j = this.getAge();
|
|
int k = j;
|
|
|
|
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
|
|
index 2700f7dc650dc19da75e9351f6d558d05be80dc5..949eda8e743df7ab83f18f15471a33e538aecdc5 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
@@ -299,6 +299,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
|
}
|
|
|
|
private static void setBeeReleaseData(int ticks, Bee bee) {
|
|
+ if (!bee.ageLocked) { // Paper - Honor ageLock
|
|
int j = bee.getAge();
|
|
|
|
if (j < 0) {
|
|
@@ -306,6 +307,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
|
} else if (j > 0) {
|
|
bee.setAge(Math.max(0, j - ticks));
|
|
}
|
|
+ } // Paper - Honor ageLock
|
|
|
|
bee.setInLoveTime(Math.max(0, bee.getInLoveTime() - ticks));
|
|
}
|