mojira.dev
MC-130320

When two linked advancements are revoked in the same tick that they were granted, an error message occurs

To reproduce:

  1. Download the attached data pack, and put into any world.

  2. Open up the game, with the console open.
    -> See that every tick, a message appears with

    Told to remove advancement advancement_bug:tick but I don't know what that is

    along with

    Loaded X advancements

This caused by the fact that the data pack does these actions, in order:

  • Grant you advancement2 if your effects have changed

  • Grant you advancement1 every tick

  • Run a function if advancement1 is true, in which is:

  • Give yourself regeneration

  • Revoke advancement1 and advancement2

Because your effects are changed by the regeneration, the error occurs.

I'm not entirely sure what causes this.

Linked issues

Attachments

Comments 13

If any of the more-technical oriented mods would like to take a look at this, it'd be great. I have no idea what's causing this, just HOW to cause it.

@unknown?

It seems like this always happens when an advancement gets revoked in the same tick it got granted. Because this also happens to me with only 1 advancement.

this still happens in 20w30a

Still occurs in 1.18.1.

Additionally, after looking into the code, these seem to be debug messages accidentally left set to INFO and WARNING by the developers.

The reason for why the info message doesn't trigger anytime an advancement is changed, I have no idea. After analyzing the code for 30 minutes it should always trigger anytime an advancement is revoked or granted, just another case of Mojang spaghetti code I guess.

Additionally, the warning message is triggered by again, Mojang spaghetti code. Sometimes when removing linked advancements, it'll attempt to remove one twice, which causes this warning.

Can confirm in 1.18.2 and 22w11a.

[media]

CreeperMagnet_

(Unassigned)

Confirmed

Platform

Normal

Data Packs

Minecraft 1.12.2, Minecraft 18w21b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, ..., 1.20.1, 23w31a, 23w32a, 1.20.4, 24w06a

Retrieved