类 ElytraItem

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

public class ElytraItem extends Item implements Equipable
  • 构造器详细资料

  • 方法详细资料

    • isFlyEnabled

      public static boolean isFlyEnabled(ItemStack pElytraStack)
    • isValidRepairItem

      public boolean isValidRepairItem(ItemStack pToRepair, ItemStack pRepair)
      覆盖:
      isValidRepairItem 在类中 Item
    • use

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

      public boolean canElytraFly(ItemStack stack, LivingEntity entity)
      从接口复制的说明: IForgeItem
      Used to determine if the player can use Elytra flight. This is called Client and Server side.
      指定者:
      canElytraFly 在接口中 IForgeItem
      参数:
      stack - The ItemStack in the Chest slot of the entity.
      entity - The entity trying to fly.
      返回:
      True if the entity can use Elytra flight.
    • elytraFlightTick

      public boolean elytraFlightTick(ItemStack stack, LivingEntity entity, int flightTicks)
      从接口复制的说明: IForgeItem
      Used to determine if the player can continue Elytra flight, this is called each tick, and can be used to apply ItemStack damage, consume Energy, or what have you. For example the Vanilla implementation of this, applies damage to the ItemStack every 20 ticks.
      指定者:
      elytraFlightTick 在接口中 IForgeItem
      参数:
      stack - ItemStack in the Chest slot of the entity.
      entity - The entity currently in Elytra flight.
      flightTicks - The number of ticks the entity has been Elytra flying for.
      返回:
      True if the entity should continue Elytra flight or False to stop.
    • getEquipSound

      public SoundEvent getEquipSound()
      指定者:
      getEquipSound 在接口中 Equipable
    • getEquipmentSlot

      public EquipmentSlot getEquipmentSlot()
      指定者:
      getEquipmentSlot 在接口中 Equipable