Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maikotui opened this issue Sep 4, 2024 · 2 comments
Open

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

maikotui opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@maikotui
Copy link

maikotui commented Sep 4, 2024

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())));
    }
@maikotui maikotui added the bug Something isn't working label Sep 4, 2024
@maikotui
Copy link
Author

maikotui commented Sep 4, 2024

Actually, I'm now realizing that this might not be a complete fix lol. Doing some testing then will update the bug report.

@maikotui
Copy link
Author

maikotui commented Sep 4, 2024

Yeah, this probably needs to be tested in a multiplayer environment. It works for singleplayer, but I doubt it will online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant