semi working fabric inventories

This commit is contained in:
dfsek
2021-02-23 22:33:08 -07:00
parent df2acfaa40
commit 4171768cc9
11 changed files with 134 additions and 9 deletions

View File

@@ -62,6 +62,7 @@ public class LootTable {
newStack.setAmount(1);
int slot = r.nextInt(i.getSize());
ItemStack slotItem = i.getItem(slot);
System.out.println("attempt: " + (slotItem == null ? null : slotItem.getHandle()));
if(slotItem == null) {
i.setItem(slot, newStack);
stack.setAmount(stack.getAmount() - 1);

View File

@@ -25,5 +25,6 @@ public class BufferedLootApplication implements BufferedItem {
}
Container container = (Container) data;
table.fillInventory(container.getInventory(), new FastRandom(origin.hashCode()));
data.update(false);
}
}