From 0f589b18b0656debd536334d7a94d31f2f7683c9 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 31 Dec 2023 16:39:45 +0100 Subject: [PATCH] feat: show infinity symbol on creative items --- CHANGELOG.md | 1 + .../refinedstorage2/platform/common/util/IdentifierUtil.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4382ce1d..de4579a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Changed - The Portable Grid now shows an energy bar in the UI. +- The energy bar on creative items now shows the infinity symbol instead of the whole amount. ## [2.0.0-milestone.3.2] - 2023-11-03 diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java index 880eb27c4..2e1f7ae24 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java @@ -40,8 +40,8 @@ public static MutableComponent createStoredWithCapacityTranslation( return createTranslation( "misc", "stored_with_capacity", - AmountFormatting.format(stored), - AmountFormatting.format(capacity), + stored == Long.MAX_VALUE ? "∞" : AmountFormatting.format(stored), + capacity == Long.MAX_VALUE ? "∞" : AmountFormatting.format(capacity), String.valueOf((int) (pct * 100D)) ); }