Chance tooltip (#906)

This commit is contained in:
slprime authored and GitHub committed 2026-04-04 00:03:15 +03:00
1 parent 70c332796a
commit ba48806667
12 files changed
+157 -80

No files matched your search

@@ -942,12 +942,14 @@ public class BookmarkPanel extends PanelWidget<BookmarkGrid> {
if (slot != null) {
if (slot.getBookmarkItem().chance != PositionedStack.CHANCE_FULL) {
final String chanceText = NEIClientUtils
.formatChance(slot.getBookmarkItem().chance / (float) PositionedStack.CHANCE_FULL);
currenttip.add(
1,
EnumChatFormatting.DARK_GRAY + NEIClientUtils.translate(
"recipe.chance",
NEIClientUtils.formatNumber(
slot.getBookmarkItem().chance * 100f / PositionedStack.CHANCE_FULL)));
EnumChatFormatting.GRAY + NEIClientUtils.translate(
slot.getType() == BookmarkItemType.INGREDIENT ? "recipe.badge.chance.consume"
: "recipe.badge.chance.output",
chanceText));
}
if (slot.getType() == BookmarkItemType.INGREDIENT && slot.getRecipeId() != null