mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Merge pull request #782 from CovertJaguar/patch-1
Allow Fluids to have Rarities
This commit is contained in:
commit
a066018c9f
2 files changed
+33
-2
No files matched your search
@@ -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(); }
|
||||
|
||||
|
||||
@@ -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"),
|
||||
Reference in new issue
Block a user