Record Class EtheriumType
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.etherium.EtheriumType
- Record Components:
color- The color of the etherium type.
Represents an etherium type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<EtheriumType>> static final com.mojang.serialization.Codec<EtheriumType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.static net.minecraft.network.chat.MutableComponentgetName(net.minecraft.core.Holder<EtheriumType> holder) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
EtheriumType
public EtheriumType(int color) Creates an instance of aEtheriumTyperecord class.- Parameters:
color- the value for thecolorrecord component
-
-
Method Details
-
getName
public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.core.Holder<EtheriumType> holder) - Parameters:
holder- The etherium typeHolderto query.- Returns:
- The display name of the given etherium type.
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
color
-