Checking if a player right clicks with a specific item on a specific entity

Started by Retronplay on

Topic category: Help with MCreator software

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Checking if a player right clicks with a specific item on a specific entity

I've been trying to figure out how to do this. Essentially, I want to change the item in a player's main hand to another item I've made if a specific entity is right-clicked with that specific item. Would greatly appreciate some help.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure with global…
Thu, 09/03/2020 - 15:15

Make a procedure with global triger 'on entity right cilick' and check if its your entity. Then check if source entity has your spesific item in its main hand. Here's example:

If: is entity (sub)type of spesific_entity

Do: If get item in main hand of source entity = spesific item

    Do: (whatever you want)

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, I've made that…
Thu, 09/03/2020 - 15:34

Yeah, I've made that procedure now. I can't quite figure out how to attach it to my item (The target entity is a vanilla mob). It says it's missing dependencies.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedures made with global…
Thu, 09/03/2020 - 16:35

Procedures made with global triggers can't jave missing dependicies  so try again but using global triger. If that dosen't work out senf me a screenshot od procedure.

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where do I change it to a…
Thu, 09/03/2020 - 16:52

Where do I change it to a global trigger (Apologies if this is simple, very new to this)?

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
While mading procedure…
Thu, 09/03/2020 - 17:09

While mading procedure without any procedure block you can see green thing. It looks like procedure block but you can't move it.

You need to click on it and set your trigger.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know i'll try to…
Thu, 09/03/2020 - 17:35

I don't know i'll try to figure it out...

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i cannot find "If get item…
Tue, 09/07/2021 - 17:28

i cannot find "If get item in main hand of source entity = spesific item" procedure block can you help?