Help with "return action result" values used with entity right click trigger

Started by Hyalite on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with "return action result" values used with entity right click trigger

Looking for some help on how to properly use the "Return action result" blocks when assigning a procedure to an entity's "When right clicked on entity" trigger.

I'm working on creating an entity that is both rideable and has an inventory (like horses). I also want the player to be able to right click on the entity with specific items in hand to perform other actions (like feeding the entity, for example) and not mount the entity or open the inventory gui. However, the issue is whenever the player right clicks on the entity with an item in hand, the item procedure will run but the player still mounts the entity.

I'm hoping to find a way for the player to not mount the entity when right clicking with those specific items in hand. Based on the directions for using the "When right clicked on entity" trigger, I started playing with implementing the Success/Consume/etc. action return values, but no matter what action result type I select, the player still mounts the entity.

Here's a simple example of what I'm trying to do (this procedure would "feed" the entity when the player has an apple in hand):

This procedure is assigned to the entity's "When right clicked on entity" trigger:

And this is the "UseItemTest" procedure that is called for the action return value:

My assumption is that I'm not using the return values correctly, so some help on understanding which values will override the action of the player mounting the entity and only run the called procedure would be appreciated.

Or, should I be doing something different entirely to achieve this result?

Thanks in advance for any help!