public class UniversalBucket extends Item implements IFluidContainerItem
Item.ToolMaterialIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRYdelegate| 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() |
int |
getCapacity(ItemStack container) |
ItemStack |
getContainerItem(ItemStack itemStack)
ItemStack sensitive version of getContainerItem.
|
ItemStack |
getEmpty() |
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) |
boolean |
hasContainerItem(ItemStack stack)
ItemStack sensitive version of hasContainerItem
|
ICapabilityProvider |
initCapabilities(ItemStack stack,
NBTTagCompound nbt)
Called from ItemStack.setItem, will hold extra data for the life of this ItemStack.
|
boolean |
isNbtSensitive() |
void |
onFillBucket(FillBucketEvent event) |
ActionResult<ItemStack> |
onItemRightClick(ItemStack itemstack,
World world,
EntityPlayer player,
EnumHand hand) |
boolean |
tryPlaceFluid(Block block,
World worldIn,
BlockPos pos)
Deprecated.
|
addInformation, addPropertyOverride, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic 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 boolean hasContainerItem(ItemStack stack)
ItemhasContainerItem in class Itemstack - The current item stackpublic ItemStack getContainerItem(ItemStack itemStack)
ItemgetContainerItem in class ItemitemStack - The current ItemStackpublic 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 ActionResult<ItemStack> onItemRightClick(ItemStack itemstack, World world, EntityPlayer player, EnumHand hand)
onItemRightClick in class Item@Deprecated public boolean tryPlaceFluid(Block block, World worldIn, BlockPos pos)
public 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.doDrain - If false, the drain will only be simulated.public int getCapacity()
public ItemStack getEmpty()
public boolean isNbtSensitive()
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt)
IteminitCapabilities in class Itemstack - The ItemStacknbt - NBT of this item serialized, or null.