Started by
elpro1000crack
on
Topic category: Help with Minecraft modding (Java Edition)
i was trying to create a custom crafting table
i cannot find one procedure that i know that has blockstate
Topic category: Help with Minecraft modding (Java Edition)
i was trying to create a custom crafting table
i cannot find one procedure that i know that has blockstate
here is the generated code (it does not let me post the image)
public class CrafteengTebleUpdateTickProcedure { public static void execute(LevelAccessor world, double x, double y, double z, Entity entity, ItemStack itemstack) { if (entity == null) return; if ((new Object() { public ItemStack getItemStack(int sltid, ItemStack _isc) { AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY); _isc.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { _retval.set(capability.getStackInSlot(sltid).copy()); }); return _retval.get(); } }.getItemStack(0, itemstack)).getItem() == Items.IRON_PICKAXE && (new Object() { public ItemStack getItemStack(int sltid, ItemStack _isc) { AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY); _isc.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { _retval.set(capability.getStackInSlot(sltid).copy()); }); return _retval.get(); } }.getItemStack(1, itemstack)).getItem() == MmmmmmmmmmmmmmmModItems.E.get() && ((new Object() { public ItemStack getItemStack(int sltid, ItemStack _isc) { AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY); _isc.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { _retval.set(capability.getStackInSlot(sltid).copy()); }); return _retval.get(); } }.getItemStack(0, itemstack)).getItem() == Items.DIAMOND_PICKAXE || (new Object() { public ItemStack getItemStack(int sltid, ItemStack _isc) { AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY); _isc.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { _retval.set(capability.getStackInSlot(sltid).copy()); }); return _retval.get(); } }.getItemStack(1, itemstack)).getItem() == MmmmmmmmmmmmmmmModItems.E.get()) && new Object() { public int getAmount(int sltid) { if (entity instanceof ServerPlayer _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); if (stack != null) return stack.getCount(); } return 0; } }.getAmount(0) == 64 && new Object() { public int getAmount(int sltid) { if (entity instanceof ServerPlayer _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); if (stack != null) return stack.getCount(); } return 0; } }.getAmount(1) == 64) { { BlockEntity _ent = world.getBlockEntity(new BlockPos(x, y, z)); if (_ent != null) { final int _slotid = 0; final int _amount = 1; _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { if (capability instanceof IItemHandlerModifiable) { ItemStack _stk = capability.getStackInSlot(_slotid).copy(); _stk.shrink(_amount); ((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _stk); } }); } } { BlockEntity _ent = world.getBlockEntity(new BlockPos(x, y, z)); if (_ent != null) { final int _slotid = 1; final int _amount = 1; _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { if (capability instanceof IItemHandlerModifiable) { ItemStack _stk = capability.getStackInSlot(_slotid).copy(); _stk.shrink(_amount); ((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _stk); } }); } } { BlockEntity _ent = world.getBlockEntity(new BlockPos(x, y, z)); if (_ent != null) { final int _slotid = 0; final ItemStack _setstack = new ItemStack(MmmmmmmmmmmmmmmModItems.PEECKAX_E.get()); _setstack.setCount(1); _ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null).ifPresent(capability -> { if (capability instanceof IItemHandlerModifiable) ((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _setstack); }); } } } } }If u got here uhhh go away please i figured it out