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, hasSubtypes, itemModifierUUID, 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, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hitEntity, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setUnlocalizedName, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic ItemFluidContainer(int itemID)
public ItemFluidContainer(int itemID,
int capacity)
public ItemFluidContainer setCapacity(int capacity)
public FluidStack getFluid(ItemStack container)
getFluid in interface IFluidContainerItemcontainer - ItemStack which is the fluid container.public int getCapacity(ItemStack container)
getCapacity in interface IFluidContainerItemcontainer - ItemStack which is the fluid container.public int fill(ItemStack container, FluidStack resource, boolean doFill)
fill in interface IFluidContainerItemcontainer - 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 IFluidContainerItemcontainer - ItemStack which is the fluid container.maxDrain - Maximum amount of fluid to be removed from the container.