Package net.minecraft.data.models
Record Class BlockModelGenerators.BookSlotModelCacheKey
java.lang.Object
java.lang.Record
net.minecraft.data.models.BlockModelGenerators.BookSlotModelCacheKey
- Enclosing class:
BlockModelGenerators
static record BlockModelGenerators.BookSlotModelCacheKey(ModelTemplate template, String modelSuffix)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for themodelSuffixrecord component.private final ModelTemplateThe field for thetemplaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBookSlotModelCacheKey(ModelTemplate template, String modelSuffix) Creates an instance of aBookSlotModelCacheKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themodelSuffixrecord component.template()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
template
The field for thetemplaterecord component. -
modelSuffix
The field for themodelSuffixrecord component.
-
-
Constructor Details
-
BookSlotModelCacheKey
BookSlotModelCacheKey(ModelTemplate template, String modelSuffix) Creates an instance of aBookSlotModelCacheKeyrecord class.- Parameters:
template- the value for thetemplaterecord componentmodelSuffix- the value for themodelSuffixrecord component
-
-
Method Details
-
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). -
template
Returns the value of thetemplaterecord component.- Returns:
- the value of the
templaterecord component
-
modelSuffix
Returns the value of themodelSuffixrecord component.- Returns:
- the value of the
modelSuffixrecord component
-