Class MilkBucketItem

All Implemented Interfaces:
ItemLike, IForgeItem, IForgeRegistryEntry<Item>

public class MilkBucketItem extends Item
  • Field Details

  • Constructor Details

  • Method Details

    • finishUsingItem

      public ItemStack finishUsingItem(ItemStack p_42923_, Level p_42924_, LivingEntity p_42925_)
      Overrides:
      finishUsingItem in class Item
    • getUseDuration

      public int getUseDuration(ItemStack p_42933_)
      Overrides:
      getUseDuration in class Item
    • getUseAnimation

      public UseAnim getUseAnimation(ItemStack p_42931_)
      Overrides:
      getUseAnimation in class Item
    • use

      public InteractionResultHolder<ItemStack> use(Level p_42927_, Player p_42928_, InteractionHand p_42929_)
      Overrides:
      use in class Item
    • initCapabilities

      public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt)
      Description copied from interface: IForgeItem
      Called from ItemStack.setItem, will hold extra data for the life of this ItemStack. Can be retrieved from stack.getCapabilities() The NBT can be null if this is not called from readNBT or if the item the stack is changing FROM is different then this item, or the previous item had no capabilities. This is called BEFORE the stacks item is set so you can use stack.getItem() to see the OLD item. Remember that getItem CAN return null.
      Parameters:
      stack - The ItemStack
      nbt - NBT of this item serialized, or null.
      Returns:
      A holder instance associated with this ItemStack where you can hold capabilities for the life of this item.