Xray icon indicating copy to clipboard operation
Xray copied to clipboard

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

Open Gamemassa opened this issue 2 years ago • 9 comments

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 avatar Sep 17 '22 13:09 Gamemassa

@ate47

Gamemassa avatar Sep 22 '22 00:09 Gamemassa

@ate47

https://github.com/ate47/ate47/blob/gh-pages/MINECRAFT.md

ate47 avatar Sep 22 '22 08:09 ate47

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 avatar Apr 24 '23 22:04 chisaato

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

chisaato avatar Apr 24 '23 22:04 chisaato

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

ate47 avatar Apr 25 '23 08:04 ate47

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 avatar May 02 '23 00:05 chisaato

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.

chisaato avatar May 02 '23 00:05 chisaato

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

icecoffeyxx avatar Jun 19 '23 18:06 icecoffeyxx

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.

chisaato avatar Jun 26 '23 15:06 chisaato