Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Update BlockRegistryPopulator
Dieser Commit ist enthalten in:
Ursprung
b79a12ea8e
Commit
a21ca9922b
@ -409,7 +409,6 @@ public final class BlockRegistryPopulator {
|
|||||||
Deque<String> cleanIdentifiers = new ArrayDeque<>();
|
Deque<String> cleanIdentifiers = new ArrayDeque<>();
|
||||||
|
|
||||||
int javaRuntimeId = -1;
|
int javaRuntimeId = -1;
|
||||||
int cobwebBlockId = -1;
|
|
||||||
int furnaceRuntimeId = -1;
|
int furnaceRuntimeId = -1;
|
||||||
int furnaceLitRuntimeId = -1;
|
int furnaceLitRuntimeId = -1;
|
||||||
int honeyBlockRuntimeId = -1;
|
int honeyBlockRuntimeId = -1;
|
||||||
@ -417,10 +416,6 @@ public final class BlockRegistryPopulator {
|
|||||||
int spawnerRuntimeId = -1;
|
int spawnerRuntimeId = -1;
|
||||||
int uniqueJavaId = -1;
|
int uniqueJavaId = -1;
|
||||||
int waterRuntimeId = -1;
|
int waterRuntimeId = -1;
|
||||||
int bubbleColumnUpwardRuntimeId = -1;
|
|
||||||
int bubbleColumnDragRuntimeId = -1;
|
|
||||||
int soulSandRuntimeId = -1;
|
|
||||||
int iceRuntimeId = -1;
|
|
||||||
Iterator<Map.Entry<String, JsonNode>> blocksIterator = blocksJson.fields();
|
Iterator<Map.Entry<String, JsonNode>> blocksIterator = blocksJson.fields();
|
||||||
while (blocksIterator.hasNext()) {
|
while (blocksIterator.hasNext()) {
|
||||||
javaRuntimeId++;
|
javaRuntimeId++;
|
||||||
@ -489,10 +484,7 @@ public final class BlockRegistryPopulator {
|
|||||||
// It's possible to only have this store differences in names, but the key set of all Java names is used in sending command suggestions
|
// It's possible to only have this store differences in names, but the key set of all Java names is used in sending command suggestions
|
||||||
BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier.intern(), bedrockIdentifier.intern());
|
BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier.intern(), bedrockIdentifier.intern());
|
||||||
|
|
||||||
if (javaId.contains("cobweb")) {
|
if (javaId.startsWith("minecraft:furnace[facing=north")) {
|
||||||
cobwebBlockId = uniqueJavaId;
|
|
||||||
|
|
||||||
} else if (javaId.startsWith("minecraft:furnace[facing=north")) {
|
|
||||||
if (javaId.contains("lit=true")) {
|
if (javaId.contains("lit=true")) {
|
||||||
furnaceLitRuntimeId = javaRuntimeId;
|
furnaceLitRuntimeId = javaRuntimeId;
|
||||||
} else {
|
} else {
|
||||||
@ -508,24 +500,9 @@ public final class BlockRegistryPopulator {
|
|||||||
honeyBlockRuntimeId = javaRuntimeId;
|
honeyBlockRuntimeId = javaRuntimeId;
|
||||||
} else if (javaId.equals("minecraft:slime_block")) {
|
} else if (javaId.equals("minecraft:slime_block")) {
|
||||||
slimeBlockRuntimeId = javaRuntimeId;
|
slimeBlockRuntimeId = javaRuntimeId;
|
||||||
} else if (javaId.startsWith("minecraft:bubble_column")) {
|
|
||||||
if (javaId.contains("drag=true")) {
|
|
||||||
bubbleColumnDragRuntimeId = javaRuntimeId;
|
|
||||||
} else {
|
|
||||||
bubbleColumnUpwardRuntimeId = javaRuntimeId;
|
|
||||||
}
|
|
||||||
} else if (javaId.equals("minecraft:soul_sand")) {
|
|
||||||
soulSandRuntimeId = javaRuntimeId;
|
|
||||||
} else if (javaId.equals("minecraft:ice")) {
|
|
||||||
iceRuntimeId = javaRuntimeId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cobwebBlockId == -1) {
|
|
||||||
throw new AssertionError("Unable to find cobwebs in palette");
|
|
||||||
}
|
|
||||||
BlockStateValues.JAVA_COBWEB_ID = cobwebBlockId;
|
|
||||||
|
|
||||||
if (furnaceRuntimeId == -1) {
|
if (furnaceRuntimeId == -1) {
|
||||||
throw new AssertionError("Unable to find furnace in palette");
|
throw new AssertionError("Unable to find furnace in palette");
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren