类 MilkBucketItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.MilkBucketItem
所有已实现的接口:
FeatureElement, ItemLike, IForgeItem

public class MilkBucketItem extends Item
  • 字段详细资料

    • DRINK_DURATION

      private static final int DRINK_DURATION
      另请参阅:
  • 构造器详细资料

  • 方法详细资料

    • finishUsingItem

      public ItemStack finishUsingItem(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving)
      覆盖:
      finishUsingItem 在类中 Item
    • getUseDuration

      public int getUseDuration(ItemStack pStack)
      覆盖:
      getUseDuration 在类中 Item
    • getUseAnimation

      public UseAnim getUseAnimation(ItemStack pStack)
      覆盖:
      getUseAnimation 在类中 Item
    • use

      public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, InteractionHand pHand)
      覆盖:
      use 在类中 Item
    • initCapabilities

      public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt)
      从接口复制的说明: 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.
      参数:
      stack - The ItemStack
      nbt - NBT of this item serialized, or null.
      返回:
      A holder instance associated with this ItemStack where you can hold capabilities for the life of this item.