Interface ModelInstance<T>
- All Known Implementing Classes:
ModelInstanceImpl
public interface ModelInstance<T>
Created 29/04/2023 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelbake(ModelBakingContext context) Converts the model data into a baked model.@Nullable net.minecraft.client.renderer.block.model.BlockModelRepresents the model as a vanillaBlockModelinstance.Collection<net.minecraft.resources.ResourceLocation>Gets all the dependencies on other model files.Gets all the dependencies on sprites.static <T> ModelInstance<T>
-
Method Details
-
of
-
getModelType
-
getModelData
T getModelData() -
getModelDependencies
Collection<net.minecraft.resources.ResourceLocation> getModelDependencies()Gets all the dependencies on other model files. -
getTextureDependencies
Gets all the dependencies on sprites.- Parameters:
context- context for gathering texture dependencies
-
bake
Converts the model data into a baked model.- Parameters:
context- context for baking the model- Returns:
- a baked model
- See Also:
-
getAsVanillaModel
@Nullable @Nullable net.minecraft.client.renderer.block.model.BlockModel getAsVanillaModel()Represents the model as a vanillaBlockModelinstance. May be used gather info from other models, such as with the vanilla 'parent' property.- Returns:
- a representation of the model as a vanilla
BlockModelinstance, ornullif such a representation is not available
-