diff options
Diffstat (limited to 'patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch')
-rw-r--r-- | patches/server/0941-Validate-ResourceLocation-in-NBT-reading.patch | 6 |
1 files changed, 3 insertions, 3 deletions
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 |