Package dev.engine_room.vanillin.item
Record Class ItemModels.ItemKey
java.lang.Object
java.lang.Record
dev.engine_room.vanillin.item.ItemModels.ItemKey
- Enclosing class:
- ItemModels
public static record ItemModels.ItemKey(net.minecraft.world.item.ItemStack stack, net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext context)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionItemKey(net.minecraft.world.item.ItemStack stack, net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext context) Creates an instance of aItemKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemDisplayContextcontext()Returns the value of thecontextrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.net.minecraft.client.resources.model.BakedModelmodel()Returns the value of themodelrecord component.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemKey
public ItemKey(net.minecraft.world.item.ItemStack stack, net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext context) Creates an instance of aItemKeyrecord class.- Parameters:
stack- the value for thestackrecord componentmodel- the value for themodelrecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
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. -
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
model
public net.minecraft.client.resources.model.BakedModel model()Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
context
public net.minecraft.world.item.ItemDisplayContext context()Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-