When right clicked on Entity do Procedure

Started by Nispeew on

Topic category: Help with modding (Java Edition)

Last seen on 13:20, 24. Apr 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When right clicked on Entity do Procedure
Sun, 03/03/2024 - 16:43 (edited)

Hi, I'm facing issues with my code, and I'm unsure why it's not working as expected. The goal is to add a potion effect to a horse when right-clicking, but currently, it only removes wheat from my inventory. Do you know what is wrong?

 

 

Edited by Nispeew on Sun, 03/03/2024 - 16:43
Last seen on 13:23, 24. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it's weird that it only…
Sun, 03/03/2024 - 19:39

it's weird that it only removes the wheat, I would expect it to either fully work, or do nothing. My advice after looking at the procedure is use source entity instead of event/target entity for the wheat, and if that doesn't work switch them.

To explain it a different way, event/target entity is the horse, and source entity(another procedure block) is the player, although I have no idea why it takes the wheat from your inventory.

I also could be wrong and source entity is the horse and event/target entity is the player, but it should be that one is the horse and one is the player.

And if there is a bug where it takes two wheat from your inventory, put everything in an if condition that checks "if" "not" "is provided world client-side" that is a general fix for most ghost item/block bugs, or something happening twice bugs.

Last seen on 13:20, 24. Apr 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much! It now…
Mon, 03/04/2024 - 13:36

Thank you so much! It now works after changing it to the source entity. :D