public class BucketItem extends Item
Item.Properties| Modifier and Type | Field and Description | 
|---|---|
| private Fluid | containedBlock | 
| private java.util.function.Supplier<? extends Fluid> | fluidSupplier | 
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, randomdelegate| Constructor and Description | 
|---|
| BucketItem(Fluid containedFluidIn,
          Item.Properties builder)Deprecated.  | 
| BucketItem(java.util.function.Supplier<? extends Fluid> supplier,
          Item.Properties builder) | 
| Modifier and Type | Method and Description | 
|---|---|
| private boolean | canBlockContainFluid(World worldIn,
                    BlockPos posIn,
                    BlockState blockstate) | 
| protected ItemStack | emptyBucket(ItemStack p_203790_1_,
           PlayerEntity p_203790_2_) | 
| private ItemStack | fillBucket(ItemStack emptyBuckets,
          PlayerEntity player,
          Item fullBucket) | 
| Fluid | getFluid() | 
| ICapabilityProvider | initCapabilities(ItemStack stack,
                CompoundNBT nbt)Called from ItemStack.setItem, will hold extra data for the life of this
 ItemStack. | 
| ActionResult<ItemStack> | onItemRightClick(World worldIn,
                PlayerEntity playerIn,
                Hand handIn) | 
| void | onLiquidPlaced(World worldIn,
              ItemStack p_203792_2_,
              BlockPos pos) | 
| protected void | playEmptySound(PlayerEntity player,
              IWorld worldIn,
              BlockPos pos) | 
| boolean | tryPlaceContainedLiquid(PlayerEntity player,
                       World worldIn,
                       BlockPos posIn,
                       BlockRayTraceResult p_180616_4_) | 
addInformation, addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, fillItemGroup, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getDrinkSound, getEatSound, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemUse, onItemUseFinish, onPlayerStoppedUsing, onUse, rayTrace, shouldSyncTag, toString, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBarprivate final Fluid containedBlock
private final java.util.function.Supplier<? extends Fluid> fluidSupplier
@Deprecated public BucketItem(Fluid containedFluidIn, Item.Properties builder)
public BucketItem(java.util.function.Supplier<? extends Fluid> supplier, Item.Properties builder)
supplier - A fluid supplier such as net.minecraftforge.fml.RegistryObjectpublic ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn)
onItemRightClick in class Itemprotected ItemStack emptyBucket(ItemStack p_203790_1_, PlayerEntity p_203790_2_)
private ItemStack fillBucket(ItemStack emptyBuckets, PlayerEntity player, Item fullBucket)
public boolean tryPlaceContainedLiquid(@Nullable
                                       PlayerEntity player,
                                       World worldIn,
                                       BlockPos posIn,
                                       @Nullable
                                       BlockRayTraceResult p_180616_4_)
protected void playEmptySound(@Nullable
                              PlayerEntity player,
                              IWorld worldIn,
                              BlockPos pos)
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundNBT nbt)
IForgeItemstack - The ItemStacknbt - NBT of this item serialized, or null.public Fluid getFluid()
private boolean canBlockContainFluid(World worldIn, BlockPos posIn, BlockState blockstate)