Biome getter API
PepperCode1 opened this issue ยท 1 comments
Is your feature request related to a problem? Please describe.
This feature is not related to a problem in Sodium.
Describe the solution you'd like
I would like Sodium to expose WorldSlice.getBiome
through some sort of interface or API.
Describe alternatives you've considered
One alternative I know of is mixing into Sodium, but this can be unstable so it would be better if this functionality was built-in.
While writing this I realized I do not need to mixin as I can just cast to WorldSlice
directly, but once again this could be unstable.
Additional context
This feature is for a mod that requires getting the Biome
inside of FabricBakedModel.emitBlockQuads
, but BlockRenderView
doesn't expose a BlockPos
or int coordinates to Biome
method or function. I was able to mixin to vanilla's ChunkRendererRegion
to allow this functionality in vanilla, but it will not work with Sodium because it does not use the ChunkRendererRegion
.
Additionally, accessing the biome using MinecraftClient.getInstance().world.getBiome(BlockPos)
might not work with mods such as Immersive Portals. I am not sure about this though, so please correct me if I'm wrong.
Resolved with #2063.