Fix block unique Java IDs (#2390)

This commit is contained in:
David Choo 2021-07-17 09:33:38 -04:00 committed by GitHub
parent a947f950fa
commit 4e629feee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,12 +270,6 @@ public class BlockRegistryPopulator {
builder.pickItem(pickItemNode.textValue()); 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()); BlockStateValues.storeBlockStateValues(entry.getKey(), javaRuntimeId, entry.getValue());
String cleanJavaIdentifier = entry.getKey().split("\\[")[0]; String cleanJavaIdentifier = entry.getKey().split("\\[")[0];
@ -286,6 +280,12 @@ public class BlockRegistryPopulator {
BlockRegistries.JAVA_CLEAN_IDENTIFIERS.register(uniqueJavaId, cleanJavaIdentifier); 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 // Keeping this here since this is currently unchanged between versions
if (!cleanJavaIdentifier.equals(bedrockIdentifier)) { if (!cleanJavaIdentifier.equals(bedrockIdentifier)) {
BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier, bedrockIdentifier); BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier, bedrockIdentifier);