Xray and Cave Hotkeys not functioning correctly when used with Rubidium.
Gamemassa opened this issue ยท 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
Obtained behavior
How to reproduce
No response
Do I want to contribute to fix it?
Maybe
Something else?
No response
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,
Press x and wait for a second. ores also show slowly.
I think this way may broke some optimizons, but I can't dig deeper due to my knowledge.
Sorry, the poor performance has cause by my custom logging. After checking my code, it works well.
still have problem.
I use /gamemode spectator to walk thourhg blocks.
as I stand in a cave.
it show very less ores.
but if I walk into the blocks (which spectator mode works here)
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.
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.
add this file
https://github.com/gzzchh/xray-reforged/blob/main/src/main/resources/atianxray.mixins.json
then update this json
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.