public class BucketItem extends Item
Item.PropertiesATTACK_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 |
|---|---|
protected ItemStack |
emptyBucket(ItemStack p_203790_1_,
PlayerEntity p_203790_2_) |
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, func_219972_a, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getTileEntityItemStackRenderer, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hasEffect, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemUse, onItemUseFinish, onPlayerStoppedUsing, rayTrace, shouldSyncTag, toString, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, 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, showDurabilityBar@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_)
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()