Class ElytraItem

All Implemented Interfaces:
IArmorVanishable, IVanishable, IItemProvider, IForgeItem, IForgeRegistryEntry<Item>

public class ElytraItem extends Item implements IArmorVanishable
  • Constructor Details

  • Method Details

    • isFlyEnabled

      public static boolean isFlyEnabled(ItemStack p_185069_0_)
    • isValidRepairItem

      public boolean isValidRepairItem(ItemStack p_82789_1_, ItemStack p_82789_2_)
      Overrides:
      isValidRepairItem in class Item
    • use

      public ActionResult<ItemStack> use(World p_77659_1_, PlayerEntity p_77659_2_, Hand p_77659_3_)
      Overrides:
      use in class Item
    • canElytraFly

      public boolean canElytraFly(ItemStack stack, LivingEntity entity)
      Description copied from interface: IForgeItem
      Used to determine if the player can use Elytra flight. This is called Client and Server side.
      Specified by:
      canElytraFly in interface IForgeItem
      Parameters:
      stack - The ItemStack in the Chest slot of the entity.
      entity - The entity trying to fly.
      Returns:
      True if the entity can use Elytra flight.
    • elytraFlightTick

      public boolean elytraFlightTick(ItemStack stack, LivingEntity entity, int flightTicks)
      Description copied from interface: 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.
      Specified by:
      elytraFlightTick in interface IForgeItem
      Parameters:
      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.
      Returns:
      True if the entity should continue Elytra flight or False to stop.