Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
39 Zeilen
1.7 KiB
Diff
39 Zeilen
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 6113e05a0636cc4895bccfbf87eef306138bcd33..22ba53d9f8866327752b0c33b517adb02c50b684 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java
|
|
@@ -84,6 +84,7 @@ public abstract class AgeableMob extends PathfinderMob {
|
|
}
|
|
|
|
public void ageUp(int age, boolean overGrow) {
|
|
+ if (this.ageLocked) return; // Paper - GH-1459
|
|
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 bd70aa9448a429f813f494c02d09432532985152..ea63802f2644bc2b5b3b0c72d7d09813cb68139d 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 - respect age lock
|
|
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 - respect age lock
|
|
|
|
bee.setInLoveTime(Math.max(0, bee.getInLoveTime() - ticks));
|
|
}
|