aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-04 11:29:46 +0200
committermakamys <makamys@outlook.com>2022-06-04 13:29:40 +0200
commit9650752e25395bb94a179c93936ed08169f0a0a8 (patch)
tree2e0f428a5a3a6e611db7a57d798e87b7986dbd94 /src/main/java/makamys/lodmod
parent6c20df930d5f5294583602e604e5fc474782e539 (diff)
downloadNeodymium-9650752e25395bb94a179c93936ed08169f0a0a8.tar.gz
Neodymium-9650752e25395bb94a179c93936ed08169f0a0a8.tar.bz2
Neodymium-9650752e25395bb94a179c93936ed08169f0a0a8.zip
Fix(?) chunk mesh sorting, and sort solid meshes as well
This didn't seem to change anything, though
Diffstat (limited to 'src/main/java/makamys/lodmod')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index c76ea64..7f094f5 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -142,7 +142,11 @@ public class LODRenderer {
private void sort() {
Entity player = Minecraft.getMinecraft().renderViewEntity;
- sentMeshes[1].sort(new MeshDistanceComparator(player.posX, player.posY, player.posZ));
+ for(List<Mesh> list : sentMeshes) {
+ list.sort(new MeshDistanceComparator(player.posX / 16, player.posY / 16, player.posZ / 16));
+ }
+ }
+
private void updateMeshes() {
for(List<Mesh> list : sentMeshes) {
for(Mesh mesh : list) {