Trying making the lenses stackable.

This commit is contained in:
Flanks255 2024-11-08 19:19:28 -06:00
parent a85dcdc0f8
commit c0e0480d73
2 changed files with 4 additions and 1 deletions

View file

@ -72,6 +72,9 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im
heldItem.shrink(1); heldItem.shrink(1);
} }
return ItemInteractionResult.CONSUME; return ItemInteractionResult.CONSUME;
} else if (ItemStack.isSameItem(heldItem, reconstructor.inv.getStackInSlot(0)) && heldItem.getCount() + 1 <= heldItem.getMaxStackSize()) {
reconstructor.inv.setStackInSlot(0, ItemStack.EMPTY);
heldItem.grow(1);
} }
} else { } else {
ItemStack slot = reconstructor.inv.getStackInSlot(0); ItemStack slot = reconstructor.inv.getStackInSlot(0);

View file

@ -20,7 +20,7 @@ public class ItemLens extends ItemBase implements ILensItem {
private final Lens type; private final Lens type;
public ItemLens(Lens type) { public ItemLens(Lens type) {
super(ActuallyItems.defaultProps().stacksTo(1)); super(ActuallyItems.defaultProps());
this.type = type; this.type = type;
} }