diff --git a/common/net/minecraftforge/fluids/Fluid.java b/common/net/minecraftforge/fluids/Fluid.java index 6e0890025..dd7bd055f 100644 --- a/common/net/minecraftforge/fluids/Fluid.java +++ b/common/net/minecraftforge/fluids/Fluid.java @@ -13,8 +13,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeDummyContainer; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.LoaderException; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.item.EnumRarity; /** * Minecraft Forge Fluid Implementation @@ -86,6 +85,13 @@ public class Fluid */ protected boolean isGaseous; + /** + * The rarity of the fluid. + * + * Used primarily in tool tips. + */ + protected EnumRarity rarity; + /** * If there is a Block implementation of the Fluid, the BlockID is linked here. * @@ -161,6 +167,12 @@ public class Fluid return this; } + public Fluid setRarity(EnumRarity rarity) + { + this.rarity = rarity; + return this; + } + public final String getName() { return this.fluidName; @@ -231,6 +243,11 @@ public class Fluid { return this.isGaseous; } + + public EnumRarity getRarity() + { + return rarity; + } public int getColor() { @@ -277,6 +294,7 @@ public class Fluid public int getTemperature(FluidStack stack){ return getTemperature(); } public int getViscosity(FluidStack stack){ return getViscosity(); } public boolean isGaseous(FluidStack stack){ return isGaseous(); } + public EnumRarity getRarity(FluidStack stack){ return getRarity(); } public int getColor(FluidStack stack){ return getColor(); } public Icon getIcon(FluidStack stack){ return getIcon(); } /* World-based Accessors */ @@ -285,6 +303,7 @@ public class Fluid public int getTemperature(World world, int x, int y, int z){ return getTemperature(); } public int getViscosity(World world, int x, int y, int z){ return getViscosity(); } public boolean isGaseous(World world, int x, int y, int z){ return isGaseous(); } + public EnumRarity getRarity(World world, int x, int y, int z){ return getRarity(); } public int getColor(World world, int x, int y, int z){ return getColor(); } public Icon getIcon(World world, int x, int y, int z){ return getIcon(); } diff --git a/patches/minecraft/net/minecraft/item/EnumRarity.java.patch b/patches/minecraft/net/minecraft/item/EnumRarity.java.patch new file mode 100644 index 000000000..d154ce11c --- /dev/null +++ b/patches/minecraft/net/minecraft/item/EnumRarity.java.patch @@ -0,0 +1,12 @@ +--- ../src_base/minecraft/net/minecraft/item/EnumRarity.java ++++ ../src_work/minecraft/net/minecraft/item/EnumRarity.java +@@ -1,9 +1,5 @@ + package net.minecraft.item; + +-import cpw.mods.fml.relauncher.Side; +-import cpw.mods.fml.relauncher.SideOnly; +- +-@SideOnly(Side.CLIENT) + public enum EnumRarity + { + common(15, "Common"),