Xray
Xray copied to clipboard
Xray and Cave Hotkeys not functioning correctly when used with Rubidium.
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
@ate47
@ate47
https://github.com/ate47/ate47/blob/gh-pages/MINECRAFT.md
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.
feel free to open a new pull request if you want a change
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.
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
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
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.