public abstract class DamageIndicatedItemFluidContainer extends net.minecraftforge.fluids.ItemFluidContainer implements IInformationProvider
ItemFluidContainer will show a damage indicator depending on how full
the container is. This can be used to hold certain amounts of Fluids in an Item.
When this item is available in a CreativeTab, it will add itself as a full and an empty container.
This container ONLY allows the fluid from the given type.| Modifier and Type | Field and Description |
|---|---|
protected DamageIndicatedItemComponent |
component |
protected net.minecraftforge.fluids.Fluid |
fluid |
bFull3D, canRepair, delegate, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSizeBLOCK_PREFIX, INFO_PREFIX, ITEM_PREFIX| Constructor and Description |
|---|
DamageIndicatedItemFluidContainer(int capacity,
net.minecraftforge.fluids.Fluid fluid)
Create a new DamageIndicatedItemFluidContainer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4) |
boolean |
canDrain(int amount,
net.minecraft.item.ItemStack itemStack)
If the given amount can be drained.
|
net.minecraftforge.fluids.FluidStack |
drain(net.minecraft.item.ItemStack container,
int maxDrain,
boolean doDrain) |
int |
fill(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill) |
double |
getDurabilityForDisplay(net.minecraft.item.ItemStack itemStack) |
net.minecraftforge.fluids.Fluid |
getFluid()
Get the fluid.
|
java.lang.String |
getInfo(net.minecraft.item.ItemStack itemStack)
Get info for a given itemStack.
|
void |
getSubItems(net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
java.util.List itemList) |
void |
provideInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4)
An extended way to provide additional information.
|
boolean |
showDurabilityBar(net.minecraft.item.ItemStack stack) |
getCapacity, getFluid, setCapacitycanHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150893_a, func_150897_b, getArmorModel, getArmorTexture, getAttributeModifiers, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDisplayDamage, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getIcon, getIcon, getIconFromDamage, getIconFromDamageForRenderPass, getIconIndex, getIconString, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRenderPasses, getShareTag, getSmeltingExperience, getSpriteNumber, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hasEffect, hitEntity, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEaten, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerIcons, registerItems, renderHelmetOverlay, requiresMultipleRenderPasses, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setTextureName, setUnlocalizedName, shouldRotateAroundWhenRenderingprotected DamageIndicatedItemComponent component
protected net.minecraftforge.fluids.Fluid fluid
public DamageIndicatedItemFluidContainer(int capacity,
net.minecraftforge.fluids.Fluid fluid)
capacity - The capacity this container will have.fluid - The Fluid instance this container must hold.public net.minecraftforge.fluids.FluidStack drain(net.minecraft.item.ItemStack container,
int maxDrain,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidContainerItemdrain in class net.minecraftforge.fluids.ItemFluidContainerpublic int fill(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
fill in interface net.minecraftforge.fluids.IFluidContainerItemfill in class net.minecraftforge.fluids.ItemFluidContainerpublic void getSubItems(net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
java.util.List itemList)
getSubItems in class net.minecraft.item.Itempublic java.lang.String getInfo(net.minecraft.item.ItemStack itemStack)
IInformationProvidergetInfo in interface IInformationProvideritemStack - The itemStack that must be given information.public void provideInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4)
IInformationProviderprovideInformation in interface IInformationProvideritemStack - The itemStack that must be given information.entityPlayer - The player that asks for information.list - The list of information.par4 - No idea...public void addInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4)
addInformation in class net.minecraft.item.Itempublic boolean showDurabilityBar(net.minecraft.item.ItemStack stack)
showDurabilityBar in class net.minecraft.item.Itempublic double getDurabilityForDisplay(net.minecraft.item.ItemStack itemStack)
getDurabilityForDisplay in class net.minecraft.item.Itempublic net.minecraftforge.fluids.Fluid getFluid()
public boolean canDrain(int amount,
net.minecraft.item.ItemStack itemStack)
amount - The amount to try to drain.itemStack - The item stack to drain from.