Loot and block drops ask the Loot and BlockDrops services

EngineBukkitOps, WorldObjectPlacer and WorldBlockDropRouter no longer read loot classes: the modules name the tables and
return resolved ItemDrops, which BukkitItemStacks creates. LootResolver keeps the generic stream helpers; table
resolution moved to LootTables in iris:loot. IrisLootEvent carries the Loot sources.
This commit is contained in:
piexel committed 2026-10-09 22:02:47 +02:00
1 parent 8137f6dba9
commit 946ad61f7f
22 files changed
+714 -261

No files matched your search

@@ -298,11 +298,10 @@ public class CommandStudio implements DirectorExecutor {
) {
if (noStudio()) return;
KList<IrisLootTable> tables = EngineBukkitOps.getLootTables(engine(), RNG.r, player().getLocation().getBlock());
Inventory inv = Bukkit.createInventory(null, 27 * 2);
try {
EngineBukkitOps.addItems(engine(), true, inv, tables, InventorySlotType.STORAGE, player().getWorld(), player().getLocation().getBlockX(), player().getLocation().getBlockY(), player().getLocation().getBlockZ());
EngineBukkitOps.addLootOf(engine(), true, inv, player().getLocation());
} catch (Throwable e) {
Iris.reportError(e);
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_CANNOT_ADD_ITEMS_VIRTUAL_INVENTORY_BECAUSE, MessageArgument.untrusted("value", String.valueOf(e.getMessage()))));
@@ -329,7 +328,7 @@ public class CommandStudio implements DirectorExecutor {
inv.clear();
}
EngineBukkitOps.addItems(engine, true, inv, tables, InventorySlotType.STORAGE, player.getWorld(), player.getLocation().getBlockX(), player.getLocation().getBlockY(), player.getLocation().getBlockZ());
EngineBukkitOps.addLootOf(engine, true, inv, player.getLocation());
}, fast ? 5 : 35));
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_OPENING_INVENTORY_NOW));