[Fix] Place Command would remove LootTable from storage containers

This commit is contained in:
Frank 2023-06-24 15:41:24 +02:00
parent 2496ddf9e6
commit 9e1d0199a8

View file

@ -463,7 +463,7 @@ public class PlaceCommand {
private static void removeLootTableSeed(Level level, BoundingBox bb) { private static void removeLootTableSeed(Level level, BoundingBox bb) {
BlocksHelper.forAllInBounds(bb, (bp) -> { BlocksHelper.forAllInBounds(bb, (bp) -> {
if (level.getBlockEntity(bp) instanceof RandomizableContainerBlockEntity rnd) { if (level.getBlockEntity(bp) instanceof RandomizableContainerBlockEntity rnd) {
rnd.setLootTable(null, 0); rnd.setLootTable(rnd.lootTable, 0);
} }
}); });
} }