public interface ModelType<T> extends Serializer<T>
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.client.renderer.block.model.IBakedModel |
bake(ModelBakingContext context,
T data)
Converts the model data into a baked model.
|
default net.minecraft.client.renderer.block.model.ModelBlock |
getAsVanillaModel(T data)
Represents the model as a vanilla
ModelBlock instance. |
java.util.Collection<net.minecraft.util.ResourceLocation> |
getModelDependencies(T data)
Gets all the dependencies on other model files.
|
java.util.Collection<SpriteIdentifier> |
getTextureDependencies(GatherTexturesContext context,
T data)
Gets all the dependencies on sprites.
|
deserialize, serializejava.util.Collection<net.minecraft.util.ResourceLocation> getModelDependencies(T data)
data - custom model datajava.util.Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context, T data)
context - context for gathering texture dependenciesdata - custom model dataGatherTexturesContextnet.minecraft.client.renderer.block.model.IBakedModel bake(ModelBakingContext context, T data)
context - context for baking the modeldata - custom model dataModelBakingContext@Nullable default net.minecraft.client.renderer.block.model.ModelBlock getAsVanillaModel(T data)
ModelBlock instance. May be used gather info from other models, such as with the vanilla 'parent' property.
If the model cannot be represented as a ModelBlock instance, this method should return null.data - custom model dataModelBlock instance, or null if such a representation is not available