diff --git a/core/src/main/java/org/geysermc/geyser/registry/populator/CreativeItemRegistryPopulator.java b/core/src/main/java/org/geysermc/geyser/registry/populator/CreativeItemRegistryPopulator.java index 5ea76ae66..50398d863 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/populator/CreativeItemRegistryPopulator.java +++ b/core/src/main/java/org/geysermc/geyser/registry/populator/CreativeItemRegistryPopulator.java @@ -81,6 +81,14 @@ public class CreativeItemRegistryPopulator { int damage = 0; int bedrockBlockRuntimeId = -1; NbtMap tag = null; + + String identifier = itemNode.get("id").textValue(); + for (BiPredicate predicate : JAVA_ONLY_ITEM_FILTER) { + if (predicate.test(identifier, damage)) { + return null; + } + } + JsonNode damageNode = itemNode.get("damage"); if (damageNode != null) { damage = damageNode.asInt(); @@ -94,6 +102,9 @@ public class CreativeItemRegistryPopulator { JsonNode blockRuntimeIdNode = itemNode.get("blockRuntimeId"); if (blockRuntimeIdNode != null) { bedrockBlockRuntimeId = blockRuntimeIdNode.asInt(); + if (bedrockBlockRuntimeId == 0 && !identifier.equals("minecraft:blue_candle")) { // FIXME + bedrockBlockRuntimeId = -1; + } } JsonNode nbtNode = itemNode.get("nbt_b64"); @@ -107,13 +118,6 @@ public class CreativeItemRegistryPopulator { } } - String identifier = itemNode.get("id").textValue(); - for (BiPredicate predicate : JAVA_ONLY_ITEM_FILTER) { - if (predicate.test(identifier, damage)) { - return null; - } - } - ItemDefinition definition = definitions.get(identifier); if (definition == null) { GeyserImpl.getInstance().getLogger().debug("Unknown item definition with identifier " + identifier + " when loading creative items!"); diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java index 9ac51c2dc..d58892ce5 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaUpdateRecipesTranslator.java @@ -158,7 +158,7 @@ public class JavaUpdateRecipesTranslator extends PacketTranslator