From 755f77a8b7229f4a23cef4302653f5dff7730348 Mon Sep 17 00:00:00 2001 From: Mysticdrew Date: Sat, 9 Mar 2024 09:06:21 -0600 Subject: [PATCH] cleanup --- .../client/cartography/render/BaseRenderer.java | 9 ++++----- src/main/java/journeymap/client/data/DataCache.java | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/journeymap/client/cartography/render/BaseRenderer.java b/src/main/java/journeymap/client/cartography/render/BaseRenderer.java index 8d8bdf0..cb0dc5a 100644 --- a/src/main/java/journeymap/client/cartography/render/BaseRenderer.java +++ b/src/main/java/journeymap/client/cartography/render/BaseRenderer.java @@ -204,8 +204,7 @@ protected Float[][] populateSlopes(final ChunkMD chunkMd, Integer vSlice, Float[][] slopes = chunkSlopes.getUnchecked(chunkMd.getCoordLong()); int y = 0, sliceMinY = 0, sliceMaxY = 0; boolean isSurface = (vSlice == null); - Float slope, primarySlope, secondarySlope; - BlockMD blockMD; + float slope, primarySlope, secondarySlope; if (!isSurface) { @@ -258,7 +257,7 @@ else if (secondarySlope < primarySlope) } // Set that slope. Set it good. Aw yeah. - if (slope.isNaN()) + if (Float.isNaN(slope)) { slope = 1f; } @@ -337,8 +336,8 @@ protected float calculateSlope(final ChunkMD chunkMd, final Collection mapTypes; final LoadingCache chunkMetadata; final ProxyRemovalListener chunkMetadataRemovalListener; - final HashMap managedCaches = new HashMap(); - final WeakHashMap privateCaches = new WeakHashMap(); + final Map managedCaches = new HashMap<>(); + final Map privateCaches = new WeakHashMap<>(); private final int chunkCacheExpireSeconds = 30; private final int defaultConcurrencyLevel = 1; - // Private constructor private DataCache() {