mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
Add more ResourceLocation checks, some cleanup
This commit is contained in:
@@ -675,7 +675,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Copied from super with changes, always check the original method
|
||||
+ this.lootableData.loadNbt(nbt); // Paper
|
||||
+ if (nbt.contains("LootTable", 8)) {
|
||||
+ this.setLootTable(new ResourceLocation(nbt.getString("LootTable")));
|
||||
+ this.setLootTable(ResourceLocation.tryParse(nbt.getString("LootTable")));
|
||||
+ try { org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate
|
||||
+ this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
||||
+ return false; // Paper - always load the items, table may still remain
|
||||
|
Reference in New Issue
Block a user