aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-09 20:29:48 +0200
committermakamys <makamys@outlook.com>2022-06-09 20:29:48 +0200
commitd086a4d0f992915ce9f8b5eae9eb239496679037 (patch)
tree8680358ad96ff5ed5209f1068e885e11a227c836 /src/main/java
parentf5643939865a77091a9deaa18c3cd41bcdf110e3 (diff)
downloadNeodymium-d086a4d0f992915ce9f8b5eae9eb239496679037.tar.gz
Neodymium-d086a4d0f992915ce9f8b5eae9eb239496679037.tar.bz2
Neodymium-d086a4d0f992915ce9f8b5eae9eb239496679037.zip
Fix rounding error when sorting meshes
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoRenderer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
index 2f3fc27..1a6ee07 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
@@ -199,7 +199,7 @@ public class NeoRenderer {
private void sort() {
Entity player = Minecraft.getMinecraft().renderViewEntity;
for(List<Mesh> list : sentMeshes) {
- list.sort(new MeshDistanceComparator(player.posX / 16, player.posY / 16, player.posZ / 16));
+ list.sort(new MeshDistanceComparator(Math.floor(player.posX / 16.0), Math.floor(player.posY / 16.0), Math.floor(player.posZ / 16.0)));
}
}