Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
use map as type instead of implemented class
Browse files Browse the repository at this point in the history
  • Loading branch information
mist475 committed Nov 21, 2023
1 parent 3916758 commit 350ea13
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/prupe/mcpatcher/MCLogger.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.prupe.mcpatcher;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Formatter;
import java.util.logging.Handler;
import java.util.logging.Level;
Expand All @@ -9,7 +10,7 @@

public class MCLogger {

private static final HashMap<String, MCLogger> allLoggers = new HashMap<>();
private static final Map<String, MCLogger> allLoggers = new HashMap<>();

public static final Level ERROR = new ErrorLevel();

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/prupe/mcpatcher/cc/Lightmap.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Map;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
Expand All @@ -25,7 +26,7 @@ public final class Lightmap {

private static final boolean useLightmaps = Config.getBoolean(MCPatcherUtils.CUSTOM_COLORS, "lightmaps", true);

private static final HashMap<Integer, Lightmap> lightmaps = new HashMap<>();
private static final Map<Integer, Lightmap> lightmaps = new HashMap<>();

private final int width;
private final boolean customNightvision;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/prupe/mcpatcher/mob/MobRandomizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
Expand All @@ -20,7 +21,7 @@
public class MobRandomizer {

private static final MCLogger logger = MCLogger.getLogger(MCPatcherUtils.RANDOM_MOBS);
private static final LinkedHashMap<String, ResourceLocation> cache = new LinkedHashMap<>();
private static final Map<String, ResourceLocation> cache = new LinkedHashMap<>();

static {
TexturePackChangeHandler.register(new TexturePackChangeHandler(MCPatcherUtils.RANDOM_MOBS, 2) {
Expand Down Expand Up @@ -85,8 +86,8 @@ public static final class ExtraInfo {
private static final long ADDEND = 0xbL;
private static final long MASK = (1L << 48) - 1;

private static final HashMap<Integer, ExtraInfo> allInfo = new HashMap<>();
private static final HashMap<WeakReference<EntityLivingBase>, ExtraInfo> allRefs = new HashMap<>();
private static final Map<Integer, ExtraInfo> allInfo = new HashMap<>();
private static final Map<WeakReference<EntityLivingBase>, ExtraInfo> allRefs = new HashMap<>();
private static final ReferenceQueue<EntityLivingBase> refQueue = new ReferenceQueue<>();

private final int entityId;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/prupe/mcpatcher/sky/SkyRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SkyRenderer {
private static float celestialAngle;
private static float rainStrength;

private static final HashMap<Integer, WorldEntry> worldSkies = new HashMap<>();
private static final Map<Integer, WorldEntry> worldSkies = new HashMap<>();
private static WorldEntry currentWorld;

public static boolean active;
Expand Down

0 comments on commit 350ea13

Please sign in to comment.