Render issue with LittleTiles
CreativeMD opened this issue ยท 6 comments
Hey there,
i'm the author of LittleTiles and recently somebody an issue:
LittleTiles blocks don't render above 256 or below 0:
LittleTiles uses a rather hacky way to save performance. It hooks into the ChunkRenderDispatcher
and adds the render data once minecraft uploads the buffer to the graphic card. Source.
Maybe we can figure out a solution together. How does CubicChunks render its chunks? Is there a way for me to hook in?
In Regards
CreativeMD
CubicChunks renders chunks exactly the same way as vanilla Minecraft does. It's close enough that optifine required only one patch to get entity rendering working and everythinbg else worked fine.
After looking at the code, I belive this is the issue: https://github.com/CreativeMD/LittleTiles/blob/6a58ecc7506c3d29616fabbe62748372a8c67113/src/main/java/com/creativemd/littletiles/client/render/RenderUploader.java#L258-L308
specifically: https://github.com/CreativeMD/LittleTiles/blob/6a58ecc7506c3d29616fabbe62748372a8c67113/src/main/java/com/creativemd/littletiles/client/render/RenderUploader.java#L288
Cubic chunks modifies the way it's calculated:
You should be able to fix the issue by reflectively calling that viewfrustum method, instead of (stil half- reflectively) reimplementing it yourself
Oh, the RenderUploader is inactive, it was just a test to modify the render data after it has been uploaded, but i threw away this idea.
Or is it really inactive?
This method is used here, which is used:
- here which is used in enough places that if it's all dead code, I'm going to seriously question the quality of your code
- here, no idea what it's for
- here, also no idea what it's for
That seems to be far from dead code
Oh sorry ... i was not really paying attention to be honest. I will try to fix it. Thanks for all your help and again sorry :(
Unfortunately things are not fixed, but it's better already.
So everything between 0 and 527 renders correctly. No idea why this is the case, but maybe you have an idea?
EDIT
Maybe because i was still using the old method ... i created a fix for it, but forgot to link to the new method.
Anyway it is fixed now! Thank you very very much for your help!!!