public class ItemFluidContainer extends Item implements IFluidContainerItem
IFluidContainerItem
. Use/extend this or implement your own.Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
protected int |
capacity |
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
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, addPropertyOverride, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getPropertyGetter, getRarity, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
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.