Package com.pixelmonmod.pixelmon.api.ui
Record Class InputElementType<T extends InputType<?>>
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.ui.InputElementType<T>
public record InputElementType<T extends InputType<?>>(com.mojang.serialization.MapCodec<T extends InputType<?>> codec, InputElementType.Data<?,?> data)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordInputElementType.Data<T extends InputType<A>,A> -
Constructor Summary
ConstructorsConstructorDescriptionInputElementType(com.mojang.serialization.MapCodec<T> codec) InputElementType(com.mojang.serialization.MapCodec<T> codec, InputElementType.Data<?, ?> data) Creates an instance of aInputElementTyperecord class.InputElementType(com.mojang.serialization.MapCodec<T> codec, Class<B> clazz, BiFunction<B, net.minecraft.network.chat.Component, A> constructor) InputElementType(com.mojang.serialization.MapCodec<T> codec, Type type, BiFunction<B, net.minecraft.network.chat.Component, A> constructor) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<T> codec()Returns the value of thecodecrecord component.<A extends InputType<B>,B>
Aconstruct(B value, net.minecraft.network.chat.Component label) data()Returns the value of thedatarecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InputElementType
public InputElementType(com.mojang.serialization.MapCodec<T> codec, Class<B> clazz, BiFunction<B, net.minecraft.network.chat.Component, A> constructor) -
InputElementType
public InputElementType(com.mojang.serialization.MapCodec<T> codec, Type type, BiFunction<B, net.minecraft.network.chat.Component, A> constructor) -
InputElementType
-
InputElementType
public InputElementType(com.mojang.serialization.MapCodec<T> codec, InputElementType.Data<?, ?> data) Creates an instance of aInputElementTyperecord class.- Parameters:
codec- the value for thecodecrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
construct
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-