Class ElementalApplications

java.lang.Object
io.github.xrickastley.sevenelements.element.ElementalApplications

public class ElementalApplications extends Object
  • Constructor Details

    • ElementalApplications

      public ElementalApplications()
  • Method Details

    • gaugeUnits

      public static ElementalApplication gaugeUnits(LivingEntity entity, Element element, double gaugeUnits)
      Creates an Elemental Application using Elemental Gauge Units.
      Parameters:
      entity - The entity to create an Elemental Application for.
      element - The Element of this Elemental Application.
      gaugeUnits - The amount of Elemental Gauge Units this Elemental Application has.
    • gaugeUnits

      public static ElementalApplication gaugeUnits(LivingEntity entity, Element element, double gaugeUnits, boolean aura)
      Creates an Elemental Application using Elemental Gauge Units.
      Parameters:
      entity - The entity to create an Elemental Application for.
      element - The Element of this Elemental Application.
      gaugeUnits - The amount of Elemental Gauge Units this Elemental Application has.
      aura - Whether this Elemental Application is an Aura Element. This means that the Aura Tax applies to the current gauge units of this Element.
    • duration

      public static ElementalApplication duration(LivingEntity entity, Element element, double gaugeUnits, double duration)
      Creates an Elemental Application with a specified duration.
      Parameters:
      entity - The entity to create an Elemental Application for.
      element - The Element of this Elemental Application.
      gaugeUnits - The amount of Gauge Units this Elemental Application has.
      duration - The duration of the Elemental Application, in ticks.
    • fromNbt

      public static ElementalApplication fromNbt(LivingEntity entity, NbtElement nbt)
      Creates an Elemental Application from an NBT.
      Parameters:
      entity - The entity to create an Elemental Application for.
      nbt - The NBT to create the Elemental Application from.
    • fromNbt

      public static ElementalApplication fromNbt(LivingEntity entity, NbtElement nbt, long syncedAt)
      Creates an Elemental Application from an NBT.
      Parameters:
      entity - The entity to create an Elemental Application for.
      nbt - The NBT to create the Elemental Application from.
      syncedAt - The world time this Elemental Application was last synced at.
    • builder

      public static ElementalApplication.Builder builder()
      Creates a new Elemental Application Builder.

      A builder is used for creating an Elemental Application without a LivingEntity to "own" the Elemental Application as of the moment.

      Once an entity exists, an instance of ElementalApplication may be created through Builder#build().
    • getTimerText

      public static Text getTimerText(ElementalApplication application)
      Gets the timer text of a provided ElementalApplication, or the standard text if unapplicable.