Class ModelBakingContextImpl

java.lang.Object
com.supermartijn642.fusion.model.ModelBakingContextImpl
All Implemented Interfaces:
ModelBakingContext

public class ModelBakingContextImpl extends Object implements ModelBakingContext
Created 27/04/2023 by SuperMartijn642
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModelBakingContextImpl(net.minecraft.client.resources.model.ModelBakery modelBakery, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.resources.ResourceLocation modelIdentifier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getModel(net.minecraft.resources.ResourceLocation identifier)
    Gets the model corresponding to the given identifier.
    net.minecraft.client.resources.model.ModelBakery
     
    net.minecraft.resources.ResourceLocation
     
    net.minecraft.client.renderer.texture.TextureAtlasSprite
    Gets the sprite for the given material.
    net.minecraft.client.renderer.texture.TextureAtlasSprite
    getTexture(net.minecraft.resources.ResourceLocation atlas, net.minecraft.resources.ResourceLocation texture)
    Gets the sprite for the given atlas and texture.
    net.minecraft.client.resources.model.ModelState
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.supermartijn642.fusion.api.model.ModelBakingContext

    getBlockTexture
  • Constructor Details

    • ModelBakingContextImpl

      public ModelBakingContextImpl(net.minecraft.client.resources.model.ModelBakery modelBakery, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.resources.ResourceLocation modelIdentifier)
  • Method Details

    • getModelBakery

      public net.minecraft.client.resources.model.ModelBakery getModelBakery()
      Specified by:
      getModelBakery in interface ModelBakingContext
      Returns:
      the model bakery
    • getTexture

      public net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(SpriteIdentifier identifier)
      Description copied from interface: ModelBakingContext
      Gets the sprite for the given material.
      Specified by:
      getTexture in interface ModelBakingContext
      Parameters:
      identifier - identifier for the sprite
    • getTexture

      public net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(net.minecraft.resources.ResourceLocation atlas, net.minecraft.resources.ResourceLocation texture)
      Description copied from interface: ModelBakingContext
      Gets the sprite for the given atlas and texture.
      Specified by:
      getTexture in interface ModelBakingContext
      Parameters:
      atlas - atlas which the texture is stitched to
      texture - texture identifier
    • getTransformation

      public net.minecraft.client.resources.model.ModelState getTransformation()
      Specified by:
      getTransformation in interface ModelBakingContext
      Returns:
      the transformations which should be applied to the model
    • getModelIdentifier

      public net.minecraft.resources.ResourceLocation getModelIdentifier()
      Specified by:
      getModelIdentifier in interface ModelBakingContext
      Returns:
      the identifier of the model.
    • getModel

      public ModelInstance<?> getModel(net.minecraft.resources.ResourceLocation identifier)
      Description copied from interface: ModelBakingContext
      Gets the model corresponding to the given identifier. Only models which were returned from ModelType.getModelDependencies(Object) may be requested.
      Specified by:
      getModel in interface ModelBakingContext
      Parameters:
      identifier - identifier for the model