Started by
bigdogawb
on
Topic category: Help with Minecraft modding (Java Edition)
Basically what the title says.
I am trying to make a procedure where whenever a player completes any advancement they get a stick (placeholder item). The problem is that when I complete an advancement sometimes I get 1 stick, sometimes I get 5, sometimes I get 7, etc. Just hoping somebody could help me debug why this might be happening.
Can you send pictures of your triggers please? I will need more information.
https://imgur.com/a/UDu0QTr
Not sure if this is what you mean, but this is all that should be needed
This may have something to do with client and server side commands, but you are using a command/triggers that don't make much sense without context. For example, in the advancements tab there is loot tables that give items when the advancement is completed. Why don't you use this?
I want to give 1 of the item every time ANY advancement is completed and this seemed like a lot less work than modifying the loot table for every single advancement in the game to give an item.
Then possibly you have completed multiple advancements in the same time period and are just getting the items that way?
No, I don't think so I have been very careful to make sure I am only doing 1, and the amount of sticks in my inventory never matches up with my "advancements completed" in the statistics tab
Could you send a screen recording of you opening the world and getting the sticks?
sure thing give me a few miniutes
Ok here it is https://streamable.com/46lbua
Alrighty, it seems that the command is being run on the server and client side, causing a strange double occurrence. I'm not too fluent in this, only seen it flung around a few times. Possibly try to use @p instead of @a? This might only cause it to run on the client side. I will experiment a little and see if I can't find another solution if that doesn't work.
Ok, Thanks so much for your help!
I have the same problem right now and I cannot find any way to fix it did you find out anything about it?
if anyone comes across this thread looking for a solution the reason is that mcreator counts recipe unlocks as advancements, not just achievements. as far as i have found there is no way to differentiate the two in the 'player completes advancement' global trigger unless you put if statements for every existing achievement