Fixed unicopia loot replacing vanilla drops for blocks instead of adding to it

This commit is contained in:
Sollace 2024-03-19 00:35:17 +00:00
parent 7d1d2f45da
commit e07377f91e
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -58,12 +58,18 @@ public interface URecipes {
LootTable table = manager.getLootTable(modId); LootTable table = manager.getLootTable(modId);
if (table != LootTable.EMPTY) { if (table != LootTable.EMPTY) {
if (id.getPath().startsWith("blocks/")) {
for (var pool : table.pools) {
supplier.pool(pool);
}
} else {
supplier.modifyPools(poolBuilder -> { supplier.modifyPools(poolBuilder -> {
for (var pool : table.pools) { for (var pool : table.pools) {
poolBuilder.with(List.of(pool.entries)); poolBuilder.with(List.of(pool.entries));
} }
}); });
} }
}
}); });
} }
} }