address my own comments
This commit is contained in:
parent
68aea43526
commit
3062eb208d
55 changed files with 88 additions and 77 deletions
|
@ -652,7 +652,7 @@ index dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..f33e5cf6d456e615050047e924d9b242
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index c2493c15d8fe4587d6ee2db100cc13303b66b39b..6a6473ebf03e5b1e502db7e66203783b9980d072 100644
|
||||
index c2493c15d8fe4587d6ee2db100cc13303b66b39b..5b183f12717008dd6c9863938c17b2e668ebded4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -19,6 +19,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
|
@ -663,7 +663,7 @@ index c2493c15d8fe4587d6ee2db100cc13303b66b39b..6a6473ebf03e5b1e502db7e66203783b
|
|||
|
||||
protected RandomizableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
@@ -45,6 +46,57 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
@@ -45,6 +46,56 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
this.lootTableSeed = lootTableSeed;
|
||||
}
|
||||
|
||||
|
@ -673,9 +673,8 @@ index c2493c15d8fe4587d6ee2db100cc13303b66b39b..6a6473ebf03e5b1e502db7e66203783b
|
|||
+ // 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