address my own comments
This commit is contained in:
parent
2d89c1f53e
commit
a404f4b9ab
4 changed files with 21 additions and 10 deletions
|
@ -673,9 +673,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Copied from super with changes, always check the original method
|
||||
+ this.lootableData.loadNbt(nbt); // Paper
|
||||
+ if (nbt.contains("LootTable", 8)) {
|
||||
+ final var loc = new net.minecraft.resources.ResourceLocation(nbt.getString("LootTable"));
|
||||
+ this.setLootTable(ResourceKey.create(net.minecraft.core.registries.Registries.LOOT_TABLE, loc));
|
||||
+ try { org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable.location()); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate
|
||||
+ this.setLootTable(net.minecraft.Optionull.map(net.minecraft.resources.ResourceLocation.tryParse(nbt.getString("LootTable")), rl -> ResourceKey.create(net.minecraft.core.registries.Registries.LOOT_TABLE, rl)));
|
||||
+ try { if (this.lootTable != null) org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable.location()); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate
|
||||
+ if (nbt.contains("LootTableSeed", 4)) {
|
||||
+ this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
||||
+ } else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue