public class ItemFluidContainer extends Item implements IFluidContainerItem
IFluidContainerItem
. Use/extend this or implement your own.Item.ToolMaterial
Modifier and Type | Field and Description |
---|---|
protected int |
capacity |
bFull3D, canRepair, delegate, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSize
Constructor and Description |
---|
ItemFluidContainer(int itemID) |
ItemFluidContainer(int itemID,
int capacity) |
Modifier and Type | Method and Description |
---|---|
FluidStack |
drain(ItemStack container,
int maxDrain,
boolean doDrain) |
int |
fill(ItemStack container,
FluidStack resource,
boolean doFill) |
int |
getCapacity(ItemStack container) |
FluidStack |
getFluid(ItemStack container) |
ItemFluidContainer |
setCapacity(int capacity) |
addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150893_a, func_150897_b, getArmorModel, getArmorTexture, getAttributeModifiers, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDisplayDamage, getDurabilityForDisplay, 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, getSubItems, 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, shouldRotateAroundWhenRendering, showDurabilityBar
public ItemFluidContainer(int itemID)
public ItemFluidContainer(int itemID, int capacity)
public ItemFluidContainer setCapacity(int capacity)
public FluidStack getFluid(ItemStack container)
getFluid
in interface IFluidContainerItem
container
- ItemStack which is the fluid container.public int getCapacity(ItemStack container)
getCapacity
in interface IFluidContainerItem
container
- ItemStack which is the fluid container.public int fill(ItemStack container, FluidStack resource, boolean doFill)
fill
in interface IFluidContainerItem
container
- ItemStack which is the fluid container.resource
- FluidStack attempting to fill the container.doFill
- If false, the fill will only be simulated.public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain)
drain
in interface IFluidContainerItem
container
- ItemStack which is the fluid container.maxDrain
- Maximum amount of fluid to be removed from the container.