Interface ModelType<T>

All Superinterfaces:
Serializer<T>
All Known Implementing Classes:
ConnectingModelType, UnknownModelType, VanillaModelType

public interface ModelType<T> extends Serializer<T>
Created 27/04/2023 by SuperMartijn642
  • Method Details

    • getModelDependencies

      Collection<net.minecraft.resources.ResourceLocation> getModelDependencies(T data)
      Gets all the dependencies on other model files.
      Parameters:
      data - custom model data
    • getTextureDependencies

      Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context, T data)
      Gets all the dependencies on sprites.
      Parameters:
      context - context for gathering texture dependencies
      data - custom model data
      See Also:
    • bake

      net.minecraft.client.resources.model.BakedModel bake(ModelBakingContext context, T data)
      Converts the model data into a baked model.
      Parameters:
      context - context for baking the model
      data - 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 vanilla BlockModel instance. May be used gather info from other models, such as with the vanilla 'parent' property. If the model cannot be represented as a BlockModel instance, this method should return null.
      Parameters:
      data - custom model data
      Returns:
      a representation of the model as a vanilla BlockModel instance, or null if such a representation is not available