Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
- {
- if(playerIn.inventory.hasItemStack(new ItemStack(this)))
- {
- int invSize = playerIn.inventory.getSizeInventory();
- for(int i=0; i<invSize; i++)
- {
- if(playerIn.inventory.getStackInSlot(i).getItem() == Items.IRON_INGOT)
- {
- ItemStack IronIngotFound = playerIn.inventory.getStackInSlot(i);
- IronIngotFound.stackSize--;
- }
- }
- }
- return super.onItemRightClick(worldIn, playerIn, handIn);
- }
Add Comment
Please, Sign In to add comment