1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-18 23:23:19 +01:00

Fix removing the "LootTable" nbt tag from Block entities ()

This bug affects vanilla, and was reported as MC-279196
This commit is contained in:
Isaac - The456 2025-01-09 17:44:50 +00:00 committed by GitHub
parent b34ae4fb3c
commit efdcaa25ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)) {
@ -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 {