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 thecolors
record component.static final CustomModelData
The field for theflags
record component.The field for thefloats
record component.static final StreamCodec
<io.netty.buffer.ByteBuf, CustomModelData> The field for thestrings
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolors()
Returns the value of thecolors
record component.final boolean
Indicates whether some other object is "equal to" this one.flags()
Returns the value of theflags
record component.floats()
Returns the value of thefloats
record component.getBoolean
(int p_388606_) getColor
(int p_388650_) getFloat
(int p_386964_) private static <T> T
getString
(int p_388912_) final int
hashCode()
Returns a hash code value for this object.strings()
Returns the value of thestrings
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
floats
The field for thefloats
record component. -
flags
The field for theflags
record component. -
strings
The field for thestrings
record component. -
colors
The field for thecolors
record component. -
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 aCustomModelData
record class.- Parameters:
floats
- the value for thefloats
record componentflags
- the value for theflags
record componentstrings
- the value for thestrings
record componentcolors
- the value for thecolors
record component
-
-
Method Details
-
getSafe
-
getFloat
-
getBoolean
-
getString
-
getColor
-
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)
. -
floats
Returns the value of thefloats
record component.- Returns:
- the value of the
floats
record component
-
flags
Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-
strings
Returns the value of thestrings
record component.- Returns:
- the value of the
strings
record component
-
colors
Returns the value of thecolors
record component.- Returns:
- the value of the
colors
record component
-