aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-09-23 17:12:42 +0800
committershedaniel <daniel@shedaniel.me>2020-09-23 17:12:42 +0800
commit6532c032ca7823592b40b55ffb6723ee425ba329 (patch)
treecfa26e874f63536d0a447b4620d28d1455b869e6
parent72e44a1432f831bdbd42f1c8a574bf22e8b4a481 (diff)
downloadRoughlyEnoughItems-6532c032ca7823592b40b55ffb6723ee425ba329.tar.gz
RoughlyEnoughItems-6532c032ca7823592b40b55ffb6723ee425ba329.tar.bz2
RoughlyEnoughItems-6532c032ca7823592b40b55ffb6723ee425ba329.zip
Use Block#getName to get the fluid name, thanks Technici4n!
Signed-off-by: shedaniel <daniel@shedaniel.me>
-rw-r--r--RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java9
-rw-r--r--gradle.properties2
2 files changed, 2 insertions, 9 deletions
diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
index d114b46a5..76f586b68 100644
--- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
+++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java
@@ -37,20 +37,16 @@ import me.shedaniel.rei.api.ConfigObject;
import me.shedaniel.rei.api.EntryStack;
import me.shedaniel.rei.api.fractions.Fraction;
import me.shedaniel.rei.api.widgets.Tooltip;
-import me.shedaniel.rei.utils.CollectionUtils;
-import me.shedaniel.rei.utils.ImmutableLiteralText;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureAtlas;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
-import net.minecraft.client.resources.language.I18n;
import net.minecraft.core.Registry;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.Fluids;
-import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -239,9 +235,6 @@ public class FluidEntryStack extends AbstractEntryStack {
@NotNull
@Override
public Component asFormattedText() {
- ResourceLocation id = Registry.FLUID.getKey(fluid);
- if (I18n.exists("block." + id.toString().replaceFirst(":", ".")))
- return new ImmutableLiteralText(I18n.get("block." + id.toString().replaceFirst(":", ".")));
- return new ImmutableLiteralText(CollectionUtils.mapAndJoinToString(id.getPath().split("_"), StringUtils::capitalize, " "));
+ return fluid.defaultFluidState().createLegacyBlock().getBlock().getName();
}
}
diff --git a/gradle.properties b/gradle.properties
index f7c5af662..e8e0e506a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
org.gradle.jvmargs=-Xmx3G
-mod_version=5.4.3
+mod_version=5.4.4
supported_version=1.16.2/3
minecraft_version=1.16.3
fabricloader_version=0.9.1+build.205