Posted May 17, 20196 yr @Override public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) { if(slotId == 9) { ItemStack result = tileentity.getStackInSlot(9); if(result.getItem() != Items.AIR) { for(int x = 0; x < 9; x++) { ItemStack stack = tileentity.getStackInSlot(x); if(stack.getCount() > 0 && stack.getItem() != Items.AIR) { stack.setCount(stack.getCount()-1); } } player.dropItem(result.splitStack(1), true); return super.slotClick(slotId, dragType, clickTypeIn, player); } } return super.slotClick(slotId, dragType, clickTypeIn, player); } that line i marked is not that i want, is it possible to set instead ot that the item stack in the drag slot?
May 17, 20196 yr stack.setCount(stack.getCount()-1); use stack.srink(1) (stack.getCount() > 0 && stack.getItem() != Items.AIR) result.getItem() != Items.AIR use !stack.isEmpty() 30 minutes ago, Schleim_time said: that line i marked is not that i want, is it possible to set instead ot that the item stack in the drag slot? what do you want ?? Edited May 17, 20196 yr by loordgek
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.