Record Class Ability
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.affinity.Ability
- Record Components:
affinity- The affinity the ability belongs to.bounds- The bounds of affinity depth the ability is active in.
- All Implemented Interfaces:
ITranslatable,ITranslatable.WithDescription,Predicate<net.minecraft.world.entity.player.Player>
public record Ability(Affinity affinity, net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds)
extends Record
implements ITranslatable.WithDescription, Predicate<net.minecraft.world.entity.player.Player>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
ITranslatable.WithDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final com.mojang.serialization.Codec<Ability>static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<Ability>>static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Ability>>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<Ability>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaffinity()Returns the value of theaffinityrecord component.net.minecraft.advancements.critereon.MinMaxBounds.Doublesbounds()Returns the value of theboundsrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId(net.minecraft.core.RegistryAccess registryAccess) getType()final inthashCode()Returns a hash code value for this object.booleantest(net.minecraft.world.entity.player.Player player) final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
getId, getTranslationKey, getTranslationKeyMethods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable.WithDescription
getDescription, getDescription, getDescriptionTranslationKey, getDescriptionTranslationKey, getDisplayName, getDisplayName, getNameTranslationKey, getNameTranslationKey
-
Field Details
-
ABILITY
- See Also:
-
REGISTRY_KEY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<Ability>> REGISTRY_KEY -
DIRECT_CODEC
-
REFERENCE_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Ability>> REFERENCE_CODEC -
LIST_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<Ability>> LIST_CODEC
-
-
Constructor Details
-
Method Details
-
test
public boolean test(net.minecraft.world.entity.player.Player player) -
getType
- Specified by:
getTypein interfaceITranslatable- Returns:
- The type of this object, for example "block" or "item".
-
getId
public net.minecraft.resources.ResourceLocation getId(net.minecraft.core.RegistryAccess registryAccess) - Specified by:
getIdin interfaceITranslatable- Returns:
- The id of this object.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
affinity
Returns the value of theaffinityrecord component.- Returns:
- the value of the
affinityrecord component
-
bounds
public net.minecraft.advancements.critereon.MinMaxBounds.Doubles bounds()Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-