From fde36a22342f768bc50e849c67226a9d10b292b6 Mon Sep 17 00:00:00 2001 From: Redned Date: Sun, 18 Jul 2021 12:47:02 -0500 Subject: [PATCH] Fix check for missing item mapping and update mappings submodule --- .../connector/registry/populator/ItemRegistryPopulator.java | 5 +++-- connector/src/main/resources/mappings | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/registry/populator/ItemRegistryPopulator.java b/connector/src/main/java/org/geysermc/connector/registry/populator/ItemRegistryPopulator.java index 16aa56121..9c1f3aa2b 100644 --- a/connector/src/main/java/org/geysermc/connector/registry/populator/ItemRegistryPopulator.java +++ b/connector/src/main/java/org/geysermc/connector/registry/populator/ItemRegistryPopulator.java @@ -120,6 +120,7 @@ public class ItemRegistryPopulator { // Used to get the Bedrock namespaced ID (in instances where there are small differences) Object2IntMap bedrockIdentifierToId = new Object2IntOpenHashMap<>(); + bedrockIdentifierToId.defaultReturnValue(Short.MIN_VALUE); List itemNames = new ArrayList<>(); @@ -264,8 +265,8 @@ public class ItemRegistryPopulator { } String bedrockIdentifier = mappingItem.getBedrockIdentifier(); int bedrockId = bedrockIdentifierToId.getInt(bedrockIdentifier); - if (bedrockIdentifier == null) { - throw new RuntimeException("Missing Bedrock ID in mappings!: " + bedrockId); + if (bedrockId == Short.MIN_VALUE) { + throw new RuntimeException("Missing Bedrock ID in mappings: " + bedrockIdentifier); } int stackSize = mappingItem.getStackSize(); diff --git a/connector/src/main/resources/mappings b/connector/src/main/resources/mappings index c921aa9b1..8351b0f5b 160000 --- a/connector/src/main/resources/mappings +++ b/connector/src/main/resources/mappings @@ -1 +1 @@ -Subproject commit c921aa9b12c2a1a471ef5f00aa040924426641dc +Subproject commit 8351b0f5bb6e9a1d614f84e18c91e82288c34bf6