Interface ModelInstance<T>

All Known Implementing Classes:
ModelInstanceImpl

public interface ModelInstance<T>
Created 29/04/2023 by SuperMartijn642
  • Method Details

    • of

      static <T> ModelInstance<T> of(ModelType<T> modelType, T modelData)
    • getModelType

      ModelType<T> getModelType()
    • getModelData

      T getModelData()
    • getModelDependencies

      Collection<net.minecraft.resources.ResourceLocation> getModelDependencies()
      Gets all the dependencies on other model files.
    • getTextureDependencies

      Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context)
      Gets all the dependencies on sprites.
      Parameters:
      context - context for gathering texture dependencies
    • bake

      net.minecraft.client.resources.model.BakedModel bake(ModelBakingContext context)
      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 vanilla BlockModel instance. May be used gather info from other models, such as with the vanilla 'parent' property.
      Returns:
      a representation of the model as a vanilla BlockModel instance, or null if such a representation is not available