From 2e46ecf28fe64404b9d5d86a933146bdbbba7eec Mon Sep 17 00:00:00 2001 From: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com> Date: Mon, 30 Dec 2019 23:37:30 +0000 Subject: [PATCH] Rename map and use correct ID when entering. --- .../src/main/java/org/geysermc/connector/utils/Toolbox.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java b/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java index b90f4d46d..6c5775d32 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java +++ b/connector/src/main/java/org/geysermc/connector/utils/Toolbox.java @@ -62,7 +62,7 @@ public class Toolbox { } catch (Exception e) { throw new AssertionError("Unable to load Java block mappings", e); } - TObjectIntMap stateRuntimeMap = new TObjectIntHashMap<>(512, 0.5f, -1); + TObjectIntMap addedStatesMap = new TObjectIntHashMap<>(512, 0.5f, -1); List paletteList = new ArrayList<>(); int javaRuntimeId = -1; @@ -76,10 +76,10 @@ public class Toolbox { CompoundTag runtimeTag = blockStateMap.remove(blockTag); if (runtimeTag != null) { - stateRuntimeMap.put(blockTag, javaRuntimeId); + addedStatesMap.put(blockTag, bedrockRuntimeId); paletteList.add(runtimeTag); } else { - int duplicateRuntimeId = stateRuntimeMap.get(blockTag); + int duplicateRuntimeId = addedStatesMap.get(blockTag); if (duplicateRuntimeId == -1) { GeyserLogger.DEFAULT.debug("Mapping " + javaId + " was not found for bedrock edition!"); } else {