Skip to content

[BUG] Revelation Not Updating Client-Side After Revoke #22

@maikotui

Description

@maikotui

Describe the bug
I've got an issue where a revealed item does not "unreveal" after the advancement is revoked. Specifically, this is occurring while using Origins to set an advancement. Then, when a player changes their origin, they will still be able to use the item that was revealed. This lasts until the user reconnects. I found a solution in my custom modpack, I'm guessing there is a better way to fix it than just adding this mixin.

@Inject(at=@At(value = "INVOKE", target = "Lnet/minecraft/advancement/PlayerAdvancementTracker;onStatusUpdate(Lnet/minecraft/advancement/Advancement;)V"), method = "revokeCriterion(Lnet/minecraft/advancement/Advancement;Ljava/lang/String;)Z")
    private void revokeCriterion(Advancement advancement, String criterionName, CallbackInfoReturnable<Boolean> cir) {
        ClientRevelationHolder.processRemovedAdvancements(new HashSet<>(Collections.singletonList(advancement.getId())));
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions