Package dev.engine_room.vanillin.item
Record Class ItemModels.BakedModelKey
java.lang.Object
java.lang.Record
dev.engine_room.vanillin.item.ItemModels.BakedModelKey
- Enclosing class:
- ItemModels
public static record ItemModels.BakedModelKey(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext displayContext, dev.engine_room.flywheel.api.material.Material material, boolean foil)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBakedModelKey(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext displayContext, dev.engine_room.flywheel.api.material.Material material, boolean foil) Creates an instance of aBakedModelKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemDisplayContextReturns the value of thedisplayContextrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfoil()Returns the value of thefoilrecord component.final inthashCode()Returns a hash code value for this object.dev.engine_room.flywheel.api.material.Materialmaterial()Returns the value of thematerialrecord component.net.minecraft.client.resources.model.BakedModelmodel()Returns the value of themodelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BakedModelKey
public BakedModelKey(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemDisplayContext displayContext, dev.engine_room.flywheel.api.material.Material material, boolean foil) Creates an instance of aBakedModelKeyrecord class.- Parameters:
model- the value for themodelrecord componentdisplayContext- the value for thedisplayContextrecord componentmaterial- the value for thematerialrecord componentfoil- the value for thefoilrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
model
public net.minecraft.client.resources.model.BakedModel model()Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
displayContext
public net.minecraft.world.item.ItemDisplayContext displayContext()Returns the value of thedisplayContextrecord component.- Returns:
- the value of the
displayContextrecord component
-
material
public dev.engine_room.flywheel.api.material.Material material()Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
foil
public boolean foil()Returns the value of thefoilrecord component.- Returns:
- the value of the
foilrecord component
-