-
Notifications
You must be signed in to change notification settings - Fork 0
qinventory
qloak edited this page May 13, 2026
·
1 revision
Item builders and stack utilities.
Item.Properties props = ItemBuilder.create()
.stackSize(16)
.durability(256)
.fireResistant()
.food(6, 0.8f)
.build();Returns a normal Item.Properties you pass to new Item(props).
// compare ignoring NBT
boolean same = StackUtils.matches(stackA, stackB);
// copy with count
ItemStack copy = StackUtils.copyWithCount(stack, 32);
// safe shrink
StackUtils.shrink(player, stack, 1);Handles creative mode players correctly (don't actually remove items).