Record Class ClientItem
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.item.ClientItem
public record ClientItem(ItemModel.Unbaked model, ClientItem.Properties properties, @Nullable RegistryContextSwapper registrySwapper)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ClientItem> private final ItemModel.Unbaked
The field for themodel
record component.private final ClientItem.Properties
The field for theproperties
record component.private final RegistryContextSwapper
The field for theregistrySwapper
record component. -
Constructor Summary
ConstructorsConstructorDescriptionClientItem
(ItemModel.Unbaked p_387005_, ClientItem.Properties p_390352_) ClientItem
(ItemModel.Unbaked model, ClientItem.Properties properties, RegistryContextSwapper registrySwapper) Creates an instance of aClientItem
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.model()
Returns the value of themodel
record component.Returns the value of theproperties
record component.Returns the value of theregistrySwapper
record component.final String
toString()
Returns a string representation of this record class.withRegistrySwapper
(RegistryContextSwapper p_399822_)
-
Field Details
-
model
The field for themodel
record component. -
properties
The field for theproperties
record component. -
registrySwapper
The field for theregistrySwapper
record component. -
CODEC
-
-
Constructor Details
-
ClientItem
-
ClientItem
public ClientItem(ItemModel.Unbaked model, ClientItem.Properties properties, @Nullable RegistryContextSwapper registrySwapper) Creates an instance of aClientItem
record class.- Parameters:
model
- the value for themodel
record componentproperties
- the value for theproperties
record componentregistrySwapper
- the value for theregistrySwapper
record component
-
-
Method Details
-
withRegistrySwapper
-
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)
. -
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
properties
Returns the value of theproperties
record component.- Returns:
- the value of the
properties
record component
-
registrySwapper
Returns the value of theregistrySwapper
record component.- Returns:
- the value of the
registrySwapper
record component
-