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

Xray and Cave Hotkeys not functioning correctly when used with Rubidium. #72

Open
Gamemassa opened this issue Sep 17, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@Gamemassa
Copy link

Mod version

2.0.4

Minecraft version

1.19.2

Mod loader

Forge

Description of the issue

When I have both Xray and Rubidium installed, the Xray and Cave hotkeys are not functioning correctly.

Excepted behavior

image

Obtained behavior

image

How to reproduce

No response

Do I want to contribute to fix it?

Maybe

Something else?

No response

@Gamemassa Gamemassa added the bug Something isn't working label Sep 17, 2022
@Gamemassa
Copy link
Author

@ate47

@ate47
Copy link
Owner

ate47 commented Sep 22, 2022

@chisaato
Copy link

chisaato commented Apr 24, 2023

I solved, but have poor performance.
we need to mixin Rubidium's class,cause Rubidium replace original render.

@Mixin(value = BlockOcclusionCache.class)
public class MixinRubidiumBlockOcclusionCache {
    @Inject(at = @At("RETURN"), method = "shouldDrawSide", cancellable = true, remap = false)
    public void shouldDrawSide(BlockState state,
                                       BlockGetter reader,
                                       BlockPos pos,
                                       Direction face,
                                       CallbackInfoReturnable<Boolean> ci) {
        XrayMain.getMod().shouldSideBeRendered(state, reader, pos, face, ci);
    }

    private MixinRubidiumBlockOcclusionCache() {
    }
}

BlockOcclusionCache is from Rubidium.

problems:

Chunk are slow to load,

image

Press x and wait for a second. ores also show slowly.
image

I think this way may broke some optimizons, but I can't dig deeper due to my knowledge.

@chisaato
Copy link

chisaato commented Apr 24, 2023

Sorry, the poor performance has cause by my custom logging. After checking my code, it works well.

@ate47
Copy link
Owner

ate47 commented Apr 25, 2023

feel free to open a new pull request if you want a change

@chisaato
Copy link

chisaato commented May 2, 2023

still have problem.
I use /gamemode spectator to walk thourhg blocks.
as I stand in a cave.
image
image

it show very less ores.

but if I walk into the blocks (which spectator mode works here)

image
image

it shows many ores.

I think rubidium has remove the block faces that far away from player. So it;s time to dive depper into Rubidium class.

@chisaato
Copy link

chisaato commented May 2, 2023

This is not a big problem. Just get close and you can see the ores.
on the other hand, I think it helps player to have a more clear recognize of ores nearby instead of seeing huge amount ores fill in the screen.

@icecoffeyxx
Copy link

im not the most tech savy, could you point to me where i would insert that coding? i am using 1.19.4 so it might be a little different

@chisaato
Copy link

https://github.com/gzzchh/xray-reforged/blob/main/src/main/java/fr/atesab/xray/mixins/MixinRubidiumBlockOcclusionCache.java

add this file

https://github.com/gzzchh/xray-reforged/blob/main/src/main/resources/atianxray.mixins.json

then update this json

image

recently i have no time to maintain this mod, but in the future I will check about the Popularity of 1.19.x and 1.20.x then choose one of them for upgrade.

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

4 participants