Contents
Class Element
java.lang.Object
com.hypixel.hytale.builtin.abilities.element.Element
- All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, IndexedLookupTableAssetMap<String,Element>>
public class Element
extends Object
implements JsonAssetWithMap<String, IndexedLookupTableAssetMap<String,Element>>
An element of the ability system, keyed by id.
An element ties a damage cause to a status: a conversion rune re-keys the supported
ability's elemental damage to
DamageCause, OnHitEffect is the status a
hit of this element applies to its victim, and a victim holding an element-tagged
status (Element=<id> asset tag) REACTS when hit by another element this
element declares in Reactions. Elements never live on spells themselves;
everything goes through damage causes and victim statuses.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe outcome of a reaction: the effect applied to the victim, and whether the element state that reacted is consumed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AssetBuilderCodec<String, Element> static final StringThe prefix of the asset tag that marks a state effect as carrying an element:Tags: { Element: [<id>] }on the EntityEffect expands toElement=<id>. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexedLookupTableAssetMap<String, Element> static AssetStore<String, Element, IndexedLookupTableAssetMap<String, Element>> intgetId()getReaction(String triggerElementId) static ColorresolveElementColor(ImpactModifiers impactModifiers, Color fallback) Resolves the display color of an entity's element conversion: the converted damage cause's damage text color, so visuals and damage numbers always match.
-
Field Details
-
EFFECT_TAG_KEY
The prefix of the asset tag that marks a state effect as carrying an element:Tags: { Element: [<id>] }on the EntityEffect expands toElement=<id>.- See Also:
-
CODEC
-
-
Constructor Details
-
Element
public Element() -
Element
-
-
Method Details
-
getAssetStore
@Nonnull public static AssetStore<String, Element, IndexedLookupTableAssetMap<String,Element>> getAssetStore() -
getAssetMap
-
getId
-
getDamageCauseId
-
getOnHitEffectId
-
getReaction
-
getEffectTagIndex
public int getEffectTagIndex()- Returns:
- the tag index a state effect carries when it belongs to this element.
-
resolveElementColor
@Nullable public static Color resolveElementColor(@Nullable ImpactModifiers impactModifiers, @Nullable Color fallback) Resolves the display color of an entity's element conversion: the converted damage cause's damage text color, so visuals and damage numbers always match. Returnsfallbackwhen the entity carries no conversion or the cause has no color.
-