press a certain creature with a pcm object

Started by mep on

Topic category: Advanced modding

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
press a certain creature with a pcm object

I'm trying to create a procedure by which, when the right mouse button is clicked on a resident, actions are performed by an object, but I don't understand how to make the procedure so that the check of the player's main hand is successful, since I don't understand how to make the program distinguish the player from the resident, I tried to set the calling entity, but an error occurs. I read something about the target entity, but in this version most likely this is not the case version 2024.4 please help

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the "Player right clicks…
Wed, 02/19/2025 - 00:35

Use the "Player right clicks on entity" event trigger, then check if the "Target entity" is the entity you want to interact with and if the main hand item of the "Source entity" is the item you're trying to use for the interaction

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I understand what you're…
Wed, 02/19/2025 - 10:01

I understand what you're talking about, but I don't know where to get the "target entity" block. That's the whole problem.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's "Event/target entity",…
Wed, 02/19/2025 - 16:12

It's "Event/target entity", it's in the "Minecraft components" section or it comes pre-loaded into a load of other blocks