How to make when you right click with a item an entity to the entity despawn and replace the item with another item?

Started by Nikola Z on

Topic category: Help with modding (Java Edition)

Last seen on 07:46, 25. Feb 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make when you right click with a item an entity to the entity despawn and replace the item with another item?

Hello again! I wanna make new mineral mod that has so much stuff. And I want to make when you right click with a specific item a specific entity to the entity despawn and replace your specific item. Just like to fill an potion with entity. CAN SOMEONE HELP ME!? XD

Last seen on 02:05, 23. Apr 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In that entity tab "when…
Sun, 01/28/2024 - 02:42

In that entity tab "when right clicked on entity" check if the player is holding the item, then use despawn entity and use spawn entity with your selected entity, then set the main hand slot with your new item.