How to place smelting output back into itemstack iterator's slot

Started by Bobamilktea_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to place smelting output back into itemstack iterator's slot

What I'm trying to is make is a procedure that makes it so every tick that a player has an effect, the inventory will be scanned for smeltable items, and those smeltable items will be replaced with their smelting output in the same slot.

My problem is the fact that I don't know how to make the smelting output item go into the slot that the smeltable item was in, and instead, every smelted item goes into slot 0.

This causes an issue where the smelting output replaces whatever is in slot 0.

How would I make it so the smelted item goes into the slot that the smeltable item was in.

Here is my procedure's setup so far: 

Procedure for smelting all smeltables in player inventory