Skip to content

Commit

Permalink
[ci skip] Clarify strip NBT comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Jan 19, 2021
1 parent 75ae28f commit 2304c13
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public void translate(ServerDeclareRecipesPacket packet, GeyserSession session)
case CRAFTING_SHAPELESS: {
ShapelessRecipeData shapelessRecipeData = (ShapelessRecipeData) recipe.getData();
ItemData output = ItemTranslator.translateToBedrock(session, shapelessRecipeData.getResult());
output = ItemData.of(output.getId(), output.getDamage(), output.getCount()); //strip NBT
// Strip NBT - tools won't appear in the recipe book otherwise
output = ItemData.of(output.getId(), output.getDamage(), output.getCount());
ItemData[][] inputCombinations = combinations(session, shapelessRecipeData.getIngredients());
for (ItemData[] inputs : inputCombinations) {
UUID uuid = UUID.randomUUID();
Expand All @@ -81,7 +82,8 @@ public void translate(ServerDeclareRecipesPacket packet, GeyserSession session)
case CRAFTING_SHAPED: {
ShapedRecipeData shapedRecipeData = (ShapedRecipeData) recipe.getData();
ItemData output = ItemTranslator.translateToBedrock(session, shapedRecipeData.getResult());
output = ItemData.of(output.getId(), output.getDamage(), output.getCount()); //strip NBT
// See above
output = ItemData.of(output.getId(), output.getDamage(), output.getCount());
ItemData[][] inputCombinations = combinations(session, shapedRecipeData.getIngredients());
for (ItemData[] inputs : inputCombinations) {
UUID uuid = UUID.randomUUID();
Expand Down

0 comments on commit 2304c13

Please sign in to comment.