From 84f6e6e0b1a88ca749446ec33608cf13fa82ebf7 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Wed, 29 May 2024 20:17:56 +0200 Subject: [PATCH] Fix max temper API for llama (#10823) --- patches/server/0570-Missing-Entity-API.patch | 17 +++++++++++++++-- .../0754-Missing-eating-regain-reason.patch | 4 ++-- ...x-several-issues-with-EntityBreedEvent.patch | 4 ++-- ...lidate-ResourceLocation-in-NBT-reading.patch | 6 +++--- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/patches/server/0570-Missing-Entity-API.patch b/patches/server/0570-Missing-Entity-API.patch index 312f0f6ea5..1f27707e2d 100644 --- a/patches/server/0570-Missing-Entity-API.patch +++ b/patches/server/0570-Missing-Entity-API.patch @@ -237,10 +237,10 @@ index d53ef42e64d87790ea86d806153f047005accb9f..57952ad65c905265799ba2d8f99cc4cf if (angry) { this.setEating(false); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 37da58385ecf40baeb4665a0d9c262da03c01763..4fa1a12e7e5c23e1d902b59f2a315eac64134aa8 100644 +index 37da58385ecf40baeb4665a0d9c262da03c01763..b6574ffbe3b9fac6ce0f4d398508c9914139f7ec 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -74,7 +74,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder type, Level world) { super(type, world); ++ this.maxDomestication = 30; // Paper - Missing entity API; configure max temper instead of a hardcoded value + } + + public boolean isTraderLlama() { +@@ -318,7 +319,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder 0.0F) { diff --git a/patches/server/0926-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0926-Fix-several-issues-with-EntityBreedEvent.patch index 872b3ba687..f4709f9402 100644 --- a/patches/server/0926-Fix-several-issues-with-EntityBreedEvent.patch +++ b/patches/server/0926-Fix-several-issues-with-EntityBreedEvent.patch @@ -119,10 +119,10 @@ index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b9 } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index d4eceb535561e11f5f7ab891e81aac285f3cd828..1dd4290287725898ace29e46b439b55df8fdd1af 100644 +index 6482cc47b7ecff784344c278ab2db9f99825a169..929fe14541b444e510b48c13aee5d69a8f58194e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -183,7 +183,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder ResourceKey.create(Registries.LOOT_TABLE, rl))); // Paper - Validate ResourceLocation); ++ this.setLootTable(net.minecraft.Optionull.map(ResourceLocation.tryParse(nbt.getString("LootTable")), rl -> ResourceKey.create(Registries.LOOT_TABLE, rl))); // Paper - Validate ResourceLocation if (this.lootableData() != null && this.getLootTable() != null) this.lootableData().loadNbt(nbt); // Paper - LootTable API if (nbt.contains("LootTableSeed", 4)) { this.setLootTableSeed(nbt.getLong("LootTableSeed")); @@ -85,7 +85,7 @@ index c256b4307e896b3e9f0a399a93db761a8c5c593f..5eda2e858b309d2be704db1015c9c114 if (nbt.contains("Brain", 10)) { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 7a2fefda293d72d665fee71ef29eea6bad3c0861..f6008004c00d45e5fb5b0b2133011e4d20d7a1ff 100644 +index f9a8bcbd58ba450bf6f5f82ae9e08b8bec9a9c4d..d680ad6ce6cfc58753a3754a1bd5113fa9778cdc 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -645,7 +645,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti