From ff2696dff811065213b2fe2cac0359e3b5fadd02 Mon Sep 17 00:00:00 2001 From: Glassmaker Date: Thu, 10 Jul 2014 15:25:53 +0300 Subject: [PATCH] Adds getLocalizedName and getUnlocalizedName to FluidStack --- src/main/java/net/minecraftforge/fluids/Fluid.java | 8 ++++++++ .../java/net/minecraftforge/fluids/FluidStack.java | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/net/minecraftforge/fluids/Fluid.java b/src/main/java/net/minecraftforge/fluids/Fluid.java index 32af741cb..8ef8b9b59 100644 --- a/src/main/java/net/minecraftforge/fluids/Fluid.java +++ b/src/main/java/net/minecraftforge/fluids/Fluid.java @@ -205,6 +205,14 @@ public class Fluid return s == null ? "" : StatCollector.translateToLocal(s); } + /** + * A FluidStack sensitive version of getUnlocalizedName + */ + public String getUnlocalizedName(FluidStack stack) + { + return this.getUnlocalizedName(); + } + /** * Returns the unlocalized name of this fluid. */ diff --git a/src/main/java/net/minecraftforge/fluids/FluidStack.java b/src/main/java/net/minecraftforge/fluids/FluidStack.java index c41a9fccc..c186c1833 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidStack.java +++ b/src/main/java/net/minecraftforge/fluids/FluidStack.java @@ -100,6 +100,16 @@ public class FluidStack return FluidRegistry.getFluid(fluidID); } + public String getLocalizedName() + { + return this.getFluid().getLocalizedName(this); + } + + public String getUnlocalizedName() + { + return this.getFluid().getUnlocalizedName(this); + } + /** * @return A copy of this FluidStack */