mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Recipes are fixed in 1.19.80
This commit is contained in:
parent
2ac7eb83c0
commit
365dd622bb
2 changed files with 12 additions and 8 deletions
|
@ -81,6 +81,14 @@ public class CreativeItemRegistryPopulator {
|
||||||
int damage = 0;
|
int damage = 0;
|
||||||
int bedrockBlockRuntimeId = -1;
|
int bedrockBlockRuntimeId = -1;
|
||||||
NbtMap tag = null;
|
NbtMap tag = null;
|
||||||
|
|
||||||
|
String identifier = itemNode.get("id").textValue();
|
||||||
|
for (BiPredicate<String, Integer> predicate : JAVA_ONLY_ITEM_FILTER) {
|
||||||
|
if (predicate.test(identifier, damage)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JsonNode damageNode = itemNode.get("damage");
|
JsonNode damageNode = itemNode.get("damage");
|
||||||
if (damageNode != null) {
|
if (damageNode != null) {
|
||||||
damage = damageNode.asInt();
|
damage = damageNode.asInt();
|
||||||
|
@ -94,6 +102,9 @@ public class CreativeItemRegistryPopulator {
|
||||||
JsonNode blockRuntimeIdNode = itemNode.get("blockRuntimeId");
|
JsonNode blockRuntimeIdNode = itemNode.get("blockRuntimeId");
|
||||||
if (blockRuntimeIdNode != null) {
|
if (blockRuntimeIdNode != null) {
|
||||||
bedrockBlockRuntimeId = blockRuntimeIdNode.asInt();
|
bedrockBlockRuntimeId = blockRuntimeIdNode.asInt();
|
||||||
|
if (bedrockBlockRuntimeId == 0 && !identifier.equals("minecraft:blue_candle")) { // FIXME
|
||||||
|
bedrockBlockRuntimeId = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonNode nbtNode = itemNode.get("nbt_b64");
|
JsonNode nbtNode = itemNode.get("nbt_b64");
|
||||||
|
@ -107,13 +118,6 @@ public class CreativeItemRegistryPopulator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String identifier = itemNode.get("id").textValue();
|
|
||||||
for (BiPredicate<String, Integer> predicate : JAVA_ONLY_ITEM_FILTER) {
|
|
||||||
if (predicate.test(identifier, damage)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemDefinition definition = definitions.get(identifier);
|
ItemDefinition definition = definitions.get(identifier);
|
||||||
if (definition == null) {
|
if (definition == null) {
|
||||||
GeyserImpl.getInstance().getLogger().debug("Unknown item definition with identifier " + identifier + " when loading creative items!");
|
GeyserImpl.getInstance().getLogger().debug("Unknown item definition with identifier " + identifier + " when loading creative items!");
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class JavaUpdateRecipesTranslator extends PacketTranslator<ClientboundUpd
|
||||||
if (GameProtocol.supports1_19_60(session)) {
|
if (GameProtocol.supports1_19_60(session)) {
|
||||||
// Note: vanilla inputs use aux value of Short.MAX_VALUE
|
// Note: vanilla inputs use aux value of Short.MAX_VALUE
|
||||||
craftingDataPacket.getCraftingData().add(SmithingTransformRecipeData.of(recipe.getIdentifier(),
|
craftingDataPacket.getCraftingData().add(SmithingTransformRecipeData.of(recipe.getIdentifier(),
|
||||||
bedrockBase, bedrockAddition, output, "smithing_table", netId++));
|
ItemDescriptorWithCount.EMPTY, bedrockBase, bedrockAddition, output, "smithing_table", netId++));
|
||||||
} else {
|
} else {
|
||||||
UUID uuid = UUID.randomUUID();
|
UUID uuid = UUID.randomUUID();
|
||||||
craftingDataPacket.getCraftingData().add(org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.ShapelessRecipeData.shapeless(uuid.toString(),
|
craftingDataPacket.getCraftingData().add(org.cloudburstmc.protocol.bedrock.data.inventory.crafting.recipe.ShapelessRecipeData.shapeless(uuid.toString(),
|
||||||
|
|
Loading…
Reference in a new issue