How Do I Auto Swap An Item On Pickup

Started by PokePuff05 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How Do I Auto Swap An Item On Pickup

Basically I want that when a specific item is picked up (it's a custom helmet) that the item will equip, and put the headgear in the player's inventory replacing the crown. I would do this on a one tick delay but I fear that this would make duping of the items possible. Any ideas on what to do? Forums are not very active so I dont expect a response but any help is appreciated. 

This is my current code by the way.

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update if anyone else has…
Thu, 03/14/2024 - 19:29

Update if anyone else has this issue

there is a block called set number of items in _ to _
if you keep the first block as provided itemstack and set the number to 0 then it will just make you not pick up anything