Started by
natoralex
on
Topic category: Help with Minecraft modding (Java Edition)
Im trying to make a quest for the game. I wanted to have a quest where if you help steve find his diamonds then he'l give some reward but i dont know how to triggers if player has diamonds in the inventory or heild in main-hand.
My setup is like this, when I tried to test it it doesnt work properly.

Are you sure that the player is not source entity rather than event/target entity, which would be Steve. Also you don't need to check whether a player exists nearby as only a player can right click the entity meaning there must be a player to start the procedure. Also you're sending a message to all players in the game?
You're then checking whether the player has 0 diamonds in their main hand, you should check that they have 4 or more. You should probably also add to remove the 4 diamonds from main hand as well.
How would that work though?
What do you mean how would it work. Change the 0 to a 10 and switch event/target entity to source entity
That wont work.
And why is that
I have no idea unless something inside the procedures is interfering with that line of code
Did you do what I said and it didn’t work?
Yes at first. I've come up with the solution of putting two sepirated procedures one for the start quest one for the end quest and it works. Thank you for the help!
currently it is checking for if Steve has 10 diamonds, not the player