if right clicked on a specific entity with item remove the item and give a other item

Started by AntekGames2013 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if right clicked on a specific entity with item remove the item and give a other item

i though il just do

 

if | is event target entity of sub type

do | remove 1 item from target inventory

      | add 1 item to target inventory

 

but it didnt work, i put the procedure in the items procedures.

can anyone help?

 

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm looking for exactly the…
Tue, 07/02/2024 - 02:00


I'm looking for exactly the same thing, but nothing and in the forums on this page almost no one ever answers

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://i.imgur.com/cxkEQak…
Tue, 07/02/2024 - 02:43

https://i.imgur.com/cxkEQak.png

You can probably edit it to remove 1 of the item from the main hand instead of the inventory using "shrink" or something but this does work as well. From memory though it might remove 1 of that item that is in the first slot (closest to the left of the hotbar not sure)

I made this is 2023.1 but I can not see why it would not still work.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is the how i did it. i…
Thu, 07/04/2024 - 03:25

This is the how i did it. 
i put sounds and particles, cause is an item from my mod, but you can just don't put these blocks

https://imgur.com/a/74LzrfE