Paper/Spigot-Server-Patches/0291-Honor-EntityAgeable.ageLock.patch
2020-11-09 00:09:37 +00:00

19 lines
784 B
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/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
index 03f7979e34355842e405ec32c713ecc34c5a7a8b..026e75e5ae9e231e3f898823825adab30237d53d 100644
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
@@ -73,6 +73,7 @@ public abstract class EntityAgeable extends EntityCreature {
}
public void setAge(int i, boolean flag) {
+ if (ageLocked) return; // Paper - GH-1459
int j = this.getAge();
int k = j;