Package dan200.computercraft.api.client
Class ModelLocation
java.lang.Object
dan200.computercraft.api.client.ModelLocation
The location of a model to load. This may either be:
- A
ModelResourceLocation, referencing an already baked model (such asminecraft:dirt#inventory). -
A
ResourceLocation, referencing a path to a model resource (such asminecraft:item/dirt. These models will be baked and stored in theModelManagerin a loader-specific way.
-
Method Summary
Modifier and TypeMethodDescriptionStream<net.minecraft.resources.ResourceLocation> Get the models this model location depends on.net.minecraft.client.resources.model.BakedModelgetModel(net.minecraft.client.resources.model.ModelManager manager) Get this model from the provided model manager.static ModelLocationofModel(net.minecraft.client.resources.model.ModelResourceLocation location) Create aModelLocationfrom model in the model manager.static ModelLocationofResource(net.minecraft.resources.ResourceLocation location) Create aModelLocationfrom a resource.
-
Method Details
-
ofModel
public static ModelLocation ofModel(net.minecraft.client.resources.model.ModelResourceLocation location) Create aModelLocationfrom model in the model manager.- Parameters:
location- The name of the model to load.- Returns:
- The new
ModelLocationinstance.
-
ofResource
Create aModelLocationfrom a resource.- Parameters:
location- The location of the model resource, such asminecraft:item/dirt.- Returns:
- The new
ModelLocationinstance.
-
getModel
public net.minecraft.client.resources.model.BakedModel getModel(net.minecraft.client.resources.model.ModelManager manager) Get this model from the provided model manager.- Parameters:
manager- The model manger.- Returns:
- This model, or the missing model if it could not be found.
-
getDependencies
Get the models this model location depends on.- Returns:
- A list of models that this model location depends on.
- See Also:
-