From 4e629feee81939f463268f990afe6d7d60dbe269 Mon Sep 17 00:00:00 2001 From: David Choo Date: Sat, 17 Jul 2021 09:33:38 -0400 Subject: [PATCH] Fix block unique Java IDs (#2390) --- .../registry/populator/BlockRegistryPopulator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/registry/populator/BlockRegistryPopulator.java b/connector/src/main/java/org/geysermc/connector/registry/populator/BlockRegistryPopulator.java index 53ed89b3a..c2ce93d16 100644 --- a/connector/src/main/java/org/geysermc/connector/registry/populator/BlockRegistryPopulator.java +++ b/connector/src/main/java/org/geysermc/connector/registry/populator/BlockRegistryPopulator.java @@ -270,12 +270,6 @@ public class BlockRegistryPopulator { builder.pickItem(pickItemNode.textValue()); } - builder.javaIdentifier(javaId); - builder.javaBlockId(uniqueJavaId); - - BlockRegistries.JAVA_IDENTIFIERS.register(javaId, javaRuntimeId); - BlockRegistries.JAVA_BLOCKS.register(javaRuntimeId, builder.build()); - BlockStateValues.storeBlockStateValues(entry.getKey(), javaRuntimeId, entry.getValue()); String cleanJavaIdentifier = entry.getKey().split("\\[")[0]; @@ -286,6 +280,12 @@ public class BlockRegistryPopulator { BlockRegistries.JAVA_CLEAN_IDENTIFIERS.register(uniqueJavaId, cleanJavaIdentifier); } + builder.javaIdentifier(javaId); + builder.javaBlockId(uniqueJavaId); + + BlockRegistries.JAVA_IDENTIFIERS.register(javaId, javaRuntimeId); + BlockRegistries.JAVA_BLOCKS.register(javaRuntimeId, builder.build()); + // Keeping this here since this is currently unchanged between versions if (!cleanJavaIdentifier.equals(bedrockIdentifier)) { BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier, bedrockIdentifier);