Class DurationElementalApplication
java.lang.Object
io.github.xrickastley.sevenelements.element.ElementalApplication
io.github.xrickastley.sevenelements.element.DurationElementalApplication
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.xrickastley.sevenelements.element.ElementalApplication
ElementalApplication.Builder, ElementalApplication.Type -
Field Summary
FieldsFields inherited from class io.github.xrickastley.sevenelements.element.ElementalApplication
appliedAt, currentGauge, DURATION_FORMAT, element, entity, GAUGE_UNIT_FORMAT, gaugeUnits, isAura, type, uuid -
Constructor Summary
ConstructorsConstructorDescriptionDurationElementalApplication(LivingEntity entity, Element element, UUID uuid, double gaugeUnits, double duration) -
Method Summary
Modifier and TypeMethodDescriptionasAura()asNbt()(package private) static ElementalApplicationfromNbt(LivingEntity entity, NbtCompound nbt, long syncedAt) protected doubleGets the default decay rate of this Elemental Application.doubleintgetText(@Nullable DecimalFormat gaugeFormat, @Nullable DecimalFormat durationFormat) getTimerText(@Nullable String gaugeFormat) getTimerText(@Nullable String gaugeFormat, @Nullable String durationFormat) getTimerText(@Nullable DecimalFormat gaugeFormat) getTimerText(@Nullable DecimalFormat gaugeFormat, @Nullable DecimalFormat durationFormat) booleanisEmpty()Returns whether this Elemental Application is empty.voidreapply(ElementalApplication application) Reapplies this Elemental Application, given thatapplicationhas the same element as this one.toString()voidupdateFromNbt(NbtElement nbt, long syncedAt) Methods inherited from class io.github.xrickastley.sevenelements.element.ElementalApplication
getAppliedAt, getAppliedTicks, getCurrentGauge, getElement, getEntity, getGaugeUnits, getText, getText, getText, getText, getType, getUuid, isAuraElement, isDuration, isGaugeUnits, isOfElement, reapply, reduceGauge, tick
-
Field Details
-
duration
private double duration
-
-
Constructor Details
-
DurationElementalApplication
DurationElementalApplication(LivingEntity entity, Element element, UUID uuid, double gaugeUnits, double duration)
-
-
Method Details
-
fromNbt
-
getDuration
public double getDuration() -
getDefaultDecayRate
protected double getDefaultDecayRate()Description copied from class:ElementalApplicationGets the default decay rate of this Elemental Application.- Specified by:
getDefaultDecayRatein classElementalApplication- Returns:
- The default decay rate of this Elemental Application in
GU/tick.
-
getRemainingTicks
public int getRemainingTicks()- Specified by:
getRemainingTicksin classElementalApplication
-
getText
public Text getText(@Nullable @Nullable DecimalFormat gaugeFormat, @Nullable @Nullable DecimalFormat durationFormat) - Specified by:
getTextin classElementalApplication
-
getTimerText
-
getTimerText
-
getTimerText
-
getTimerText
-
getTimerText
public Text getTimerText(@Nullable @Nullable DecimalFormat gaugeFormat, @Nullable @Nullable DecimalFormat durationFormat) -
isEmpty
public boolean isEmpty()Returns whether this Elemental Application is empty.
This implementation guarantees this to betruewhencurrentGaugereaches0or when the current world time, given byEntity.getWorld().getTime()exceedsduration + appliedAt.- Specified by:
isEmptyin classElementalApplication
-
reapply
Description copied from class:ElementalApplicationReapplies this Elemental Application, given thatapplicationhas the same element as this one.- Specified by:
reapplyin classElementalApplication- Parameters:
application- The Elemental Application to reapply using this application.
-
asAura
- Specified by:
asAurain classElementalApplication
-
asNonAura
- Specified by:
asNonAurain classElementalApplication
-
asNbt
- Overrides:
asNbtin classElementalApplication
-
updateFromNbt
- Overrides:
updateFromNbtin classElementalApplication
-
toString
-