Started by
Maks1709
on
Topic category: Help with Minecraft modding (Java Edition)
I made a gui with slot limited to a couple items with custom code but it doesn't with custom blocks :/ (I fvcked up the id when creating, it should be right cuz i copied it from orginal code)
this.customSlots.put(1, this.addSlot(new SlotItemHandler(internal, 1, 97, 21) {
@Override
public boolean isItemValid(ItemStack stack) {
return (Blocks.DIRT.asItem() == stack.getItem()) || (LemonSamplingBlock.block.asItem() == stack.getItem());