Rendering issues of the bounding box
noeppi-noeppi opened this issue ยท 1 comments
Versions
Minecraft: 1.16.5
Forge: Doesn't matter
Skyblock Builder: 1.16.4-1.5.0
Modpack: None
Describe the bug
The more far out you travel, the more buggier the rendering of the bounding box gets when holding the structure saver.
How to reproduce
- Create a new world
- Teleport far out (at least a million blocks to see the results better, it also occurs just a few thousand block out)
- Mark a bounding box with the structure saver
Expected behavior
A non bugged bounding box
How to solve
- Read Javadocs: https://noeppi-noeppi.github.io/LibX/io/github/noeppi_noeppi/libx/render/RenderHelperWorld.html#loadProjection-com.mojang.blaze3d.matrix.MatrixStack-net.minecraft.util.math.vector.Vector3d-
- Fix ths line: https://github.com/MelanX/SkyblockBuilder/blob/1.16.x/src/main/java/de/melanx/skyblockbuilder/EventListener.java#L193
Screenshots
Because it's you here the code that should fix it (not tested though):
RenderHelperWorld.loadProjection(matrixStack, area.minX, area.minY, area.minZ);
and then
WorldRenderer.drawBoundingBox(matrixStack, buffer, 0, 0, 0, area.maxX - area.minX, area.maxY - area.minY, area.maxZ - area.minZ, 0.9f, 0.9f, 0.9f, 1);