Add an Icon to the LiquidStack, for rendering the liquid in various ways
This commit is contained in:
parent
b0e42ebcea
commit
e5913fb29f
1 changed files with 20 additions and 1 deletions
|
@ -1,9 +1,13 @@
|
|||
package net.minecraftforge.liquids;
|
||||
|
||||
import static cpw.mods.fml.relauncher.Side.CLIENT;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
/**
|
||||
* ItemStack substitute for liquids
|
||||
|
@ -108,4 +112,19 @@ public class LiquidStack
|
|||
liquidstack.readFromNBT(nbt);
|
||||
return liquidstack.itemID == 0 ? null : liquidstack;
|
||||
}
|
||||
|
||||
@SideOnly(CLIENT)
|
||||
private Icon renderingIcon;
|
||||
|
||||
@SideOnly(CLIENT)
|
||||
public Icon getRenderingIcon()
|
||||
{
|
||||
return renderingIcon;
|
||||
}
|
||||
|
||||
@SideOnly(CLIENT)
|
||||
public void setRenderingIcon(Icon icon)
|
||||
{
|
||||
this.renderingIcon = icon;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue