Add an Icon to the LiquidStack, for rendering the liquid in various ways

This commit is contained in:
Christian 2013-03-06 20:54:24 -05:00
parent b0e42ebcea
commit e5913fb29f

View file

@ -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;
}
}