mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 18:54:45 +00:00
Chance tooltip (#906)
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user