Package dan200.computercraft.api.client
Record Class TransformedModel
java.lang.Object
java.lang.Record
dan200.computercraft.api.client.TransformedModel
- Record Components:
model
- The model.matrix
- The transformation matrix.
public record TransformedModel(net.minecraft.client.resources.model.BakedModel model, com.mojang.math.Transformation matrix)
extends Record
A model to render, combined with a transformation matrix to apply.
-
Constructor Summary
ConstructorsConstructorDescriptionTransformedModel
(net.minecraft.client.resources.model.BakedModel model) TransformedModel
(net.minecraft.client.resources.model.BakedModel model, com.mojang.math.Transformation matrix) Creates an instance of aTransformedModel
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.com.mojang.math.Transformation
matrix()
Returns the value of thematrix
record component.net.minecraft.client.resources.model.BakedModel
model()
Returns the value of themodel
record component.static TransformedModel
of
(ModelLocation location) Look up a model in the model bakery and construct aTransformedModel
with no transformation.static TransformedModel
of
(net.minecraft.client.resources.model.ModelResourceLocation location) Look up a model in the model bakery and construct aTransformedModel
with no transformation.static TransformedModel
of
(net.minecraft.resources.ResourceLocation location) Look up a model in the model bakery and construct aTransformedModel
with no transformation.static TransformedModel
of
(net.minecraft.world.item.ItemStack item, com.mojang.math.Transformation transform) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
Look up a model in the model bakery and construct aTransformedModel
with no transformation.- Parameters:
location
- The location of the model to load.- Returns:
- The new
TransformedModel
instance.
-
of
public static TransformedModel of(net.minecraft.client.resources.model.ModelResourceLocation location) Look up a model in the model bakery and construct aTransformedModel
with no transformation.- Parameters:
location
- The location of the model to load.- Returns:
- The new
TransformedModel
instance. - See Also:
-
of
Look up a model in the model bakery and construct aTransformedModel
with no transformation.- Parameters:
location
- The location of the model to load.- Returns:
- The new
TransformedModel
instance. - See Also:
-
of
public static TransformedModel of(net.minecraft.world.item.ItemStack item, com.mojang.math.Transformation transform) -
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
public net.minecraft.client.resources.model.BakedModel model()Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
matrix
public com.mojang.math.Transformation matrix()Returns the value of thematrix
record component.- Returns:
- the value of the
matrix
record component
-