public class UniversalBucket extends Item implements IFluidContainerItem
Item.ToolMaterial| Modifier and Type | Field and Description |
|---|---|
int |
capacity |
ItemStack |
empty |
boolean |
nbtSensitive |
bFull3D, canRepair, delegate, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize| Constructor and Description |
|---|
UniversalBucket() |
UniversalBucket(int capacity,
ItemStack empty,
boolean nbtSensitive) |
| 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) |
static ItemStack |
getFilledBucket(UniversalBucket item,
Fluid fluid) |
FluidStack |
getFluid(ItemStack container) |
java.lang.String |
getItemStackDisplayName(ItemStack stack) |
void |
getSubItems(Item itemIn,
CreativeTabs tab,
java.util.List<ItemStack> subItems)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
void |
onFillBucket(FillBucketEvent event) |
ItemStack |
onItemRightClick(ItemStack itemstack,
World world,
EntityPlayer player)
Called whenever this item is equipped and the right mouse button is pressed.
|
boolean |
tryPlaceFluid(Block block,
World worldIn,
BlockPos pos) |
addInformation, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRegistryName, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setRegistryName, setRegistryName, setRegistryName, setUnlocalizedName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic final int capacity
public final ItemStack empty
public final boolean nbtSensitive
public UniversalBucket()
public UniversalBucket(int capacity,
ItemStack empty,
boolean nbtSensitive)
capacity - Capacity of the containerempty - Item used for filling with the bucket event and returned when emptiednbtSensitive - Whether the empty item is NBT sensitive (usually true if empty and full are the same items)public void getSubItems(Item itemIn, CreativeTabs tab, java.util.List<ItemStack> subItems)
getSubItems in class Itempublic java.lang.String getItemStackDisplayName(ItemStack stack)
getItemStackDisplayName in class Itempublic ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
onItemRightClick in class Itempublic void onFillBucket(FillBucketEvent event)
public static ItemStack getFilledBucket(UniversalBucket item, Fluid fluid)
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.