Class ModelInstanceImpl<T>

java.lang.Object
com.supermartijn642.fusion.model.ModelInstanceImpl<T>
All Implemented Interfaces:
ModelInstance<T>

public class ModelInstanceImpl<T> extends Object implements ModelInstance<T>
Created 29/04/2023 by SuperMartijn642
  • Constructor Details

    • ModelInstanceImpl

      public ModelInstanceImpl(ModelType<T> modelType, T modelData)
  • Method Details

    • getModelType

      public ModelType<T> getModelType()
      Specified by:
      getModelType in interface ModelInstance<T>
    • getModelData

      public T getModelData()
      Specified by:
      getModelData in interface ModelInstance<T>
    • getModelDependencies

      public Collection<net.minecraft.resources.ResourceLocation> getModelDependencies()
      Description copied from interface: ModelInstance
      Gets all the dependencies on other model files.
      Specified by:
      getModelDependencies in interface ModelInstance<T>
    • getTextureDependencies

      public Collection<SpriteIdentifier> getTextureDependencies(GatherTexturesContext context)
      Description copied from interface: ModelInstance
      Gets all the dependencies on sprites.
      Specified by:
      getTextureDependencies in interface ModelInstance<T>
      Parameters:
      context - context for gathering texture dependencies
    • getAsVanillaModel

      @Nullable public @Nullable net.minecraft.client.renderer.block.model.BlockModel getAsVanillaModel()
      Description copied from interface: ModelInstance
      Represents the model as a vanilla BlockModel instance. May be used gather info from other models, such as with the vanilla 'parent' property.
      Specified by:
      getAsVanillaModel in interface ModelInstance<T>
      Returns:
      a representation of the model as a vanilla BlockModel instance, or null if such a representation is not available
    • bake

      public net.minecraft.client.resources.model.BakedModel bake(ModelBakingContext context)
      Description copied from interface: ModelInstance
      Converts the model data into a baked model.
      Specified by:
      bake in interface ModelInstance<T>
      Parameters:
      context - context for baking the model
      Returns:
      a baked model
      See Also: