From 22609b1d540d4164d3ffe7fd4cde29c72db414c7 Mon Sep 17 00:00:00 2001 From: ShetiPhian Date: Tue, 5 Aug 2014 19:53:45 -0400 Subject: [PATCH] Legacy Liquid Load Fix nbt.getString("FluidName") no longer returns null, it returns an empty string. This patch allows legacy liquids to be resolved once again. --- src/main/java/net/minecraftforge/fluids/FluidStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/fluids/FluidStack.java b/src/main/java/net/minecraftforge/fluids/FluidStack.java index c41a9fccc..a44af5fa8 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidStack.java +++ b/src/main/java/net/minecraftforge/fluids/FluidStack.java @@ -2,7 +2,7 @@ package net.minecraftforge.fluids; import java.util.Locale; - +import com.google.common.base.Strings; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -60,7 +60,7 @@ public class FluidStack return null; } String fluidName = nbt.getString("FluidName"); - if (fluidName == null) + if (Strings.isNullOrEmpty(fluidName)) { fluidName = nbt.hasKey("LiquidName") ? nbt.getString("LiquidName").toLowerCase(Locale.ENGLISH) : null; fluidName = Fluid.convertLegacyName(fluidName);