mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-27 18:59:17 +00:00
Fix client crashing related to sending & unlocking smithing recipes
This commit is contained in:
@@ -168,7 +168,6 @@ public class JavaRecipeBookAddTranslator extends PacketTranslator<ClientboundRec
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
List<String> bedrockRecipeIds = new ArrayList<>();
|
||||
for (ItemDescriptorWithCount template : templates) {
|
||||
for (ItemDescriptorWithCount base : bases) {
|
||||
for (ItemDescriptorWithCount addition : additions) {
|
||||
@@ -176,13 +175,9 @@ public class JavaRecipeBookAddTranslator extends PacketTranslator<ClientboundRec
|
||||
// Note: vanilla inputs use aux value of Short.MAX_VALUE
|
||||
craftingDataPacket.getCraftingData().add(SmithingTransformRecipeData.of(id,
|
||||
template, base, addition, output.right(), "smithing_table", netId++));
|
||||
|
||||
recipesPacket.getUnlockedRecipes().add(id);
|
||||
bedrockRecipeIds.add(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
javaToBedrockRecipeIds.put(contents.id(), bedrockRecipeIds);
|
||||
session.getSmithingRecipes().add(new GeyserSmithingRecipe(smithingRecipe));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user