diff options
author | Lulu13022002 <[email protected]> | 2024-05-29 20:17:56 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-29 11:17:56 -0700 |
commit | 84f6e6e0b1a88ca749446ec33608cf13fa82ebf7 (patch) | |
tree | 03ce6538313548ec1f63d9202b9ab54bd8f28b0c | |
parent | 9d6f2cced75c1a433c508ab531a61872bce73854 (diff) | |
download | Paper-84f6e6e0b1a88ca749446ec33608cf13fa82ebf7.tar.gz Paper-84f6e6e0b1a88ca749446ec33608cf13fa82ebf7.zip |
Fix max temper API for llama (#10823)
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<Llama.V +@@ -74,10 +74,11 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V @Nullable private Llama caravanHead; @Nullable @@ -249,6 +249,19 @@ index 37da58385ecf40baeb4665a0d9c262da03c01763..4fa1a12e7e5c23e1d902b59f2a315eac public Llama(EntityType<? extends Llama> 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<Llama.V + + @Override + public int getMaxTemper() { +- return 30; ++ return super.getMaxTemper(); // Paper - Missing entity API; delegate to parent + } + + @Override diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java index b0ac85dc3c67d2e4d70dfb09d4e8fc349aba14d2..b5cb4e4682f66ac9423af8d1547d0f1a4f9e6c5d 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/patches/server/0754-Missing-eating-regain-reason.patch b/patches/server/0754-Missing-eating-regain-reason.patch index 7c26c6d752..c0552cc611 100644 --- a/patches/server/0754-Missing-eating-regain-reason.patch +++ b/patches/server/0754-Missing-eating-regain-reason.patch @@ -31,10 +31,10 @@ index 85e0a68d85fe62df19ad9809b1869a3eee6d5465..bc346a6ab6aaa7de363e058d1065fd14 boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove(); 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 4fa1a12e7e5c23e1d902b59f2a315eac64134aa8..d4eceb535561e11f5f7ab891e81aac285f3cd828 100644 +index ad54de2cf8b8be7ce072c58848ae6b79078f247c..6482cc47b7ecff784344c278ab2db9f99825a169 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 -@@ -188,7 +188,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V +@@ -189,7 +189,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V } if (this.getHealth() < this.getMaxHealth() && f > 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<Llama.V +@@ -184,7 +184,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V f = 10.0F; if (this.isTamed() && this.getAge() == 0 && this.canFallInLove()) { flag = true; diff --git a/patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch index d198424f39..f1217f22a8 100644 --- a/patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch @@ -40,7 +40,7 @@ index d93b623ce973b63d4f3a77bfe459f51af7cb3c1c..2c4553312f2f37f8613ac813708b4b95 this.path = path; } diff --git a/src/main/java/net/minecraft/world/RandomizableContainer.java b/src/main/java/net/minecraft/world/RandomizableContainer.java -index 68fadc351464dde459eb4cc86660cf9add40d04e..feb35fba0c56445ee910dbe1af9b36f21b4ec480 100644 +index 68fadc351464dde459eb4cc86660cf9add40d04e..a9a80f8bc4a6f250fe3c20482c395058f024fabd 100644 --- a/src/main/java/net/minecraft/world/RandomizableContainer.java +++ b/src/main/java/net/minecraft/world/RandomizableContainer.java @@ -50,7 +50,7 @@ public interface RandomizableContainer extends Container { @@ -48,7 +48,7 @@ index 68fadc351464dde459eb4cc86660cf9add40d04e..feb35fba0c56445ee910dbe1af9b36f2 default boolean tryLoadLootTable(CompoundTag nbt) { if (nbt.contains("LootTable", 8)) { - this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, new ResourceLocation(nbt.getString("LootTable")))); -+ this.setLootTable(net.minecraft.Optionull.map(ResourceLocation.tryParse(nbt.getString("LootTable")), rl -> 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 |