Class CustomElytraTest.CustomElytra

java.lang.Object
net.minecraft.world.item.Item
net.minecraftforge.debug.item.CustomElytraTest.CustomElytra
All Implemented Interfaces:
ItemLike, IForgeItem
Enclosing class:
CustomElytraTest

public static class CustomElytraTest.CustomElytra extends Item
  • Constructor Details

  • Method Details

    • getEquipmentSlot

      @Nullable public @Nullable EquipmentSlot getEquipmentSlot(ItemStack stack)
      Description copied from interface: IForgeItem
      Override this to set a non-default armor slot for an ItemStack, but do not use this to get the armor slot of said stack; for that, use LivingEntity.getEquipmentSlotForItem(ItemStack)..
      Parameters:
      stack - the ItemStack
      Returns:
      the armor slot of the ItemStack, or null to let the default vanilla logic as per LivingEntity.getSlotForItemStack(stack) decide
    • 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.
      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.
      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.