Removed fluidID from ItemStack.

This fixes a rather huge issue where FluidStacks on the client could be desynced if a modder was unaware of it.

This is a breaking change but can be mitigated with a transformer to the getter getFluidID().

Signed-off-by: King Lemming <[email protected]>
This commit is contained in:
King Lemming authored and cpw committed 2015-04-05 22:30:39 -04:00
1 parent 38b9febfe5
commit 3fc40b955a
6 files changed
+88 -82

No files matched your search

@@ -33,7 +33,7 @@ import net.minecraft.item.EnumRarity;
*
*/
public class Fluid
{
{
/** The unique identification name for this fluid. */
protected final String fluidName;
@@ -65,13 +65,17 @@ public class Fluid
*
* Default value is approximately the real-life room temperature of water in degrees Kelvin.
*/
protected int temperature = 295;
protected int temperature = 300;
/**
* Viscosity ("thickness") of the fluid - completely arbitrary; negative values are not
* permissible.
*
* Default value is approximately the real-life density of water in m/s^2 (x10^-3).
*
* Higher viscosity means that a fluid flows more slowly, like molasses.
* Lower viscosity means that a fluid flows more quickly, like helium.
*
*/
protected int viscosity = 1000;
@@ -318,19 +322,4 @@ public class Fluid
public int getColor(World world, int x, int y, int z){ return getColor(); }
public IIcon getIcon(World world, int x, int y, int z){ return getIcon(); }
private static Map<String, String> legacyNames = Maps.newHashMap();
static String convertLegacyName(String fluidName)
{
return fluidName != null && legacyNames.containsKey(fluidName) ? legacyNames.get(fluidName) : fluidName;
}
/**
* Register a legacy liquid name with the Fluids system
* @param legacyName The legacy name to recognize
* @param canonicalName The canonical fluid name it will become
*/
public static void registerLegacyName(String legacyName, String canonicalName)
{
legacyNames.put(legacyName.toLowerCase(Locale.ENGLISH), canonicalName);
}
}