Schnittstelle UItemExtension

Alle bekannten Implementierungsklassen:
UItem

public interface UItemExtension
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default boolean
    canBeDropped(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player)
    Should the player be able to drop this item?
    default boolean
    shouldPlayUpdateAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack)
    Should play update animations when e.g. switching item slots or updating stacks
    default boolean
    updateItemEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity)
    Called when the item is dropped in the world as an ItemEntity
  • Methodendetails

    • shouldPlayUpdateAnimation

      default boolean shouldPlayUpdateAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack)
      Should play update animations when e.g. switching item slots or updating stacks
      Parameter:
      oldStack - Old stack
      newStack - New stack
      Gibt zurück:
      Return true to update
    • canBeDropped

      default boolean canBeDropped(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player)
      Should the player be able to drop this item?
      Parameter:
      stack - Stack
      player - Player
      Gibt zurück:
      Return true to allow drops
    • updateItemEntity

      default boolean updateItemEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity)
      Called when the item is dropped in the world as an ItemEntity
      Parameter:
      stack - Stack
      entity - ItemEntity that holds this stack
      Gibt zurück:
      Return true to skip the default tick logic, false otherwise