Skip to content

Fix Xaero's world map being transparent - #98

Merged
Phoenix-Ra merged 1 commit into
VisorModStudio:devfrom
UrBoiTom:fix/xaero-world-map
Oct 24, 2026
Merged

Phoenix-Ra merged 1 commit into
VisorModStudio:devfrom
UrBoiTom:fix/xaero-world-map

Conversation

@UrBoiTom

Copy link
Copy Markdown
Contributor

Adds an opaque background behind the map as it copies its background's opacity.

@Phoenix-Ra

Copy link
Copy Markdown
Member

Hey, thank you for PR!

Did you test on older versions like 1.21.1, 1.20.1?

I noticed that this does not have stonecutter logic excluding versions that don't have an issue from mixin. Im worried it might create issues for older versions

    //1.21.6+
    @Inject(method = {"extractRenderState", "render", "method_25394"},
            at = @At(value = "FIELD", target = "Lxaero/lib/client/graphics/XaeroRenderType;RP_MAP_FRAME", opcode = Opcodes.GETSTATIC),
            require = 0, remap = false)
    private void visor$opaqueMapBacking(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick, CallbackInfo ci) {
        if (VisorState.get().isNotActive()) return;
        Window window = MC.getWindow();
        graphics.fill(0, 0, window.getWidth(), window.getHeight(), 0xFF000000);
    }

    //1.21.5-
    @ModifyExpressionValue(method = {"render", "method_25394"},
            at = @At(value = "FIELD", target = "Lxaero/map/mods/SupportMods;vivecraft:Z", opcode = Opcodes.GETSTATIC),
            require = 0, remap = false)
    private boolean visor$vivecraftRenderPath(boolean original) {
        return original || VisorState.get().isActive();
    }

@UrBoiTom

Copy link
Copy Markdown
Contributor Author

Did you test on older versions like 1.21.1, 1.20.1?

Not yet, I didn't have time because it was taking too long to build, I will test them as soon as I get the chance

@UrBoiTom

Copy link
Copy Markdown
Contributor Author

@Phoenix-Ra Tested on forge 1.20.1 and it does exactly what I expected, nothing. It's why I didn't add stonecutter logic, all the fix does is add a black background to the world map. If it doesn't need it it just adds a black background that changes nothing visually, if it does need it it adds a background that does fix it. Also means it will work on any minecraft version that might have broken without it going forwards, including older versions too.

@Phoenix-Ra

Copy link
Copy Markdown
Member

Alright, I started the workflow to build for all versions then make sure its fine and if all good - merge

@Phoenix-Ra
Phoenix-Ra merged commit d2716f5 into VisorModStudio:dev Oct 24, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants