diff options
author | makamys <makamys@outlook.com> | 2023-12-02 22:12:02 +0100 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2023-12-03 00:38:41 +0100 |
commit | 1b32e6e42aa0d377ee7556b504130e37e26463bf (patch) | |
tree | 4fb598c7cbddb6ff8c24d251c255e06a4705766b /src/main | |
parent | 5db6a3d12652e4d01beb5c13b91247f1ab36d4f1 (diff) | |
download | Neodymium-1b32e6e42aa0d377ee7556b504130e37e26463bf.tar.gz Neodymium-1b32e6e42aa0d377ee7556b504130e37e26463bf.tar.bz2 Neodymium-1b32e6e42aa0d377ee7556b504130e37e26463bf.zip |
Remove unused comparators
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/Comparators.java | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/Comparators.java b/src/main/java/makamys/neodymium/renderer/Comparators.java index 61dc1bc..f72cad9 100644 --- a/src/main/java/makamys/neodymium/renderer/Comparators.java +++ b/src/main/java/makamys/neodymium/renderer/Comparators.java @@ -2,58 +2,9 @@ package makamys.neodymium.renderer; import java.util.Comparator; -import net.minecraft.entity.Entity; -import net.minecraft.world.ChunkCoordIntPair; - public class Comparators { public static final MeshDistanceComparator MESH_DISTANCE_COMPARATOR = new MeshDistanceComparator(); - public static class NeoChunkComparator implements Comparator<NeoChunk> { - Entity player; - - public NeoChunkComparator(Entity player) { - this.player = player; - } - - @Override - public int compare(NeoChunk p1, NeoChunk p2) { - int distSq1 = distSq(p1); - int distSq2 = distSq(p2); - return distSq1 < distSq2 ? -1 : distSq1 > distSq2 ? 1 : 0; - } - - int distSq(NeoChunk p) { - return (int)( - Math.pow(((p.x * 16) - player.chunkCoordX), 2) + - Math.pow(((p.z * 16) - player.chunkCoordZ), 2) - ); - } - } - - public static class ChunkCoordDistanceComparator implements Comparator<ChunkCoordIntPair> { - double x, y, z; - - public ChunkCoordDistanceComparator(double x, double y, double z) { - this.x = x; - this.y = y; - this.z = z; - } - - @Override - public int compare(ChunkCoordIntPair p1, ChunkCoordIntPair p2) { - int distSq1 = distSq(p1); - int distSq2 = distSq(p2); - return distSq1 < distSq2 ? -1 : distSq1 > distSq2 ? 1 : 0; - } - - int distSq(ChunkCoordIntPair p) { - return (int)( - Math.pow(((p.chunkXPos * 16) - x), 2) + - Math.pow(((p.chunkZPos * 16) - z), 2) - ); - } - } - public static class MeshDistanceComparator implements Comparator<Mesh> { double x, y, z; boolean inverted; |