Skip to content

Commit

Permalink
Fix removing the "LootTable" nbt tag from Block entities (#11929)
Browse files Browse the repository at this point in the history
This bug affects vanilla, and was reported as MC-279196
  • Loading branch information
456dev authored Jan 9, 2025
1 parent b34ae4f commit efdcaa2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
this.setLootTable(lootTable);
this.setLootTableSeed(seed);
}
@@ -50,14 +_,15 @@
@@ -50,15 +_,17 @@

default boolean tryLoadLootTable(CompoundTag tag) {
if (tag.contains("LootTable", 8)) {
Expand All @@ -25,8 +25,10 @@
- return true;
+ return this.lootableData() == null; // Paper - only track the loot table if there is chance for replenish
} else {
+ setLootTable(null); // Paper - Fix removing loottable from nbt not updating block entity, MC-279196
return false;
}
}
@@ -69,26 +_,42 @@
return false;
} else {
Expand Down

0 comments on commit efdcaa2

Please sign in to comment.