Player completes advancement global trigger not counting correctly

Started by bigdogawb on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Player completes advancement global trigger not counting correctly

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.

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you send pictures of…
Thu, 05/13/2021 - 18:10

Can you send pictures of your triggers please? I will need more information.

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This may have something to…
Thu, 05/13/2021 - 18:18

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?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want to give 1 of the item…
Thu, 05/13/2021 - 18:21

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.

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then possibly you have…
Thu, 05/13/2021 - 18:28

Then possibly you have completed multiple advancements in the same time period and are just getting the items that way?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No, I don't think so I have…
Thu, 05/13/2021 - 18:29

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

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could you send a screen…
Thu, 05/13/2021 - 18:30

Could you send a screen recording of you opening the world and getting the sticks?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sure thing give me a few…
Thu, 05/13/2021 - 18:31

sure thing give me a few miniutes 

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alrighty, it seems that the…
Thu, 05/13/2021 - 18:42

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.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, Thanks so much for your…
Thu, 05/13/2021 - 18:43

Ok, Thanks so much for your help!

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the same problem…
Wed, 03/08/2023 - 09:15

I have the same problem right now and I cannot find any way to fix it did you find out anything about it?

 

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if anyone comes across this…
Tue, 06/27/2023 - 18:58

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