Interface ModelType<T>
- All Superinterfaces:
Serializer<T>
- All Known Implementing Classes:
ConnectingModelType,UnknownModelType,VanillaModelType
Created 27/04/2023 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelbake(ModelBakingContext context, T data) Converts the model data into a baked model.default @Nullable net.minecraft.client.renderer.block.model.BlockModelgetAsVanillaModel(T data) Represents the model as a vanillaBlockModelinstance.Collection<net.minecraft.resources.ResourceLocation>getModelDependencies(T data) Gets all the dependencies on other model files.getTextureDependencies(GatherTexturesContext context, T data) Gets all the dependencies on sprites.Methods inherited from interface com.supermartijn642.fusion.api.util.Serializer
deserialize, serialize
-
Method Details
-
getModelDependencies
Gets all the dependencies on other model files.- Parameters:
data- custom model data
-
getTextureDependencies
Gets all the dependencies on sprites.- Parameters:
context- context for gathering texture dependenciesdata- custom model data- See Also:
-
bake
Converts the model data into a baked model.- Parameters:
context- context for baking the modeldata- custom model data- Returns:
- a baked model
- See Also:
-
getAsVanillaModel
@Nullable default @Nullable net.minecraft.client.renderer.block.model.BlockModel getAsVanillaModel(T data) Represents the model as a vanillaBlockModelinstance. May be used gather info from other models, such as with the vanilla 'parent' property. If the model cannot be represented as aBlockModelinstance, this method should returnnull.- Parameters:
data- custom model data- Returns:
- a representation of the model as a vanilla
BlockModelinstance, ornullif such a representation is not available
-