Started by
Nispeew
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
Thank you so much! It now works after changing it to the source entity. :D