Skip to content

Commit

Permalink
Prevent showing "Recipe By" when the recipe category is by the same m…
Browse files Browse the repository at this point in the history
…od as the recipe
  • Loading branch information
mezz committed Sep 12, 2024
1 parent 879f116 commit eebff6b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ public IRecipeSlotBuilder addSlotToWidget(RecipeIngredientRole role, ISlottedWid
private void addOutputSlotTooltipCallback(RecipeSlotBuilder slot) {
ResourceLocation recipeName = recipeCategory.getRegistryName(recipe);
if (recipeName != null) {
OutputSlotTooltipCallback callback = new OutputSlotTooltipCallback(recipeName);
slot.addRichTooltipCallback(callback);
ResourceLocation recipeTypeUid = recipeCategory.getRecipeType().getUid();
if (!recipeTypeUid.getNamespace().equals(recipeName.getNamespace())) {
OutputSlotTooltipCallback callback = new OutputSlotTooltipCallback(recipeName);
slot.addRichTooltipCallback(callback);
}
}
}

Expand Down

0 comments on commit eebff6b

Please sign in to comment.