Record Class CustomModelData
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.CustomModelData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CustomModelData> The field for thecolorsrecord component.static final CustomModelDataThe field for theflagsrecord component.The field for thefloatsrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, CustomModelData> The field for thestringsrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolors()Returns the value of thecolorsrecord component.final booleanIndicates whether some other object is "equal to" this one.flags()Returns the value of theflagsrecord component.floats()Returns the value of thefloatsrecord component.@Nullable BooleangetBoolean(int index) @Nullable IntegergetColor(int index) @Nullable FloatgetFloat(int index) private static <T> @Nullable T@Nullable StringgetString(int index) final inthashCode()Returns a hash code value for this object.strings()Returns the value of thestringsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
floats
-
flags
-
strings
-
colors
-
EMPTY
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
CustomModelData
public CustomModelData(List<Float> floats, List<Boolean> flags, List<String> strings, List<Integer> colors) Creates an instance of aCustomModelDatarecord class.- Parameters:
floats- the value for thefloatsrecord componentflags- the value for theflagsrecord componentstrings- the value for thestringsrecord componentcolors- the value for thecolorsrecord component
-
-
Method Details
-
getSafe
-
getFloat
-
getBoolean
-
getString
-
getColor
-
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 withObjects::equals(Object,Object). -
floats
-
flags
-
strings
-
colors
-