Allow Fluids to have Rarities
Used for tool tips.
This commit is contained in:
parent
519da32391
commit
b626c888b0
2 changed files with 33 additions and 2 deletions
|
@ -13,8 +13,7 @@ import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDummyContainer;
|
import net.minecraftforge.common.ForgeDummyContainer;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
import cpw.mods.fml.common.LoaderException;
|
import cpw.mods.fml.common.LoaderException;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import net.minecraft.item.EnumRarity;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minecraft Forge Fluid Implementation
|
* Minecraft Forge Fluid Implementation
|
||||||
|
@ -86,6 +85,13 @@ public class Fluid
|
||||||
*/
|
*/
|
||||||
protected boolean isGaseous;
|
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.
|
* If there is a Block implementation of the Fluid, the BlockID is linked here.
|
||||||
*
|
*
|
||||||
|
@ -161,6 +167,12 @@ public class Fluid
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Fluid setRarity(EnumRarity rarity)
|
||||||
|
{
|
||||||
|
this.rarity = rarity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public final String getName()
|
public final String getName()
|
||||||
{
|
{
|
||||||
return this.fluidName;
|
return this.fluidName;
|
||||||
|
@ -231,6 +243,11 @@ public class Fluid
|
||||||
{
|
{
|
||||||
return this.isGaseous;
|
return this.isGaseous;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EnumRarity getRarity()
|
||||||
|
{
|
||||||
|
return rarity;
|
||||||
|
}
|
||||||
|
|
||||||
public int getColor()
|
public int getColor()
|
||||||
{
|
{
|
||||||
|
@ -277,6 +294,7 @@ public class Fluid
|
||||||
public int getTemperature(FluidStack stack){ return getTemperature(); }
|
public int getTemperature(FluidStack stack){ return getTemperature(); }
|
||||||
public int getViscosity(FluidStack stack){ return getViscosity(); }
|
public int getViscosity(FluidStack stack){ return getViscosity(); }
|
||||||
public boolean isGaseous(FluidStack stack){ return isGaseous(); }
|
public boolean isGaseous(FluidStack stack){ return isGaseous(); }
|
||||||
|
public EnumRarity getRarity(FluidStack stack){ return getRarity(); }
|
||||||
public int getColor(FluidStack stack){ return getColor(); }
|
public int getColor(FluidStack stack){ return getColor(); }
|
||||||
public Icon getIcon(FluidStack stack){ return getIcon(); }
|
public Icon getIcon(FluidStack stack){ return getIcon(); }
|
||||||
/* World-based Accessors */
|
/* 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 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 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 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 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(); }
|
public Icon getIcon(World world, int x, int y, int z){ return getIcon(); }
|
||||||
|
|
||||||
|
|
12
patches/minecraft/net/minecraft/item/EnumRarity.java.patch
Normal file
12
patches/minecraft/net/minecraft/item/EnumRarity.java.patch
Normal file
|
@ -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"),
|
Loading…
Reference in a new issue