Class UnbakedElementsHelper

java.lang.Object
net.neoforged.neoforge.client.model.UnbakedElementsHelper

public final class UnbakedElementsHelper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final net.minecraft.client.renderer.block.model.ItemModelGenerator
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<net.minecraft.client.renderer.block.model.BakedQuad>
    bakeElements(List<net.minecraft.client.renderer.block.model.BlockElement> elements, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState)
    Bakes a list of block elements and returns the list of baked quads.
    static void
    bakeElements(net.minecraft.client.resources.model.QuadCollection.Builder builder, List<net.minecraft.client.renderer.block.model.BlockElement> elements, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState)
    Bakes a list of block elements and feeds the baked quads to a quad collection builder.
    static net.minecraft.client.resources.model.ModelState
    composeRootTransformIntoModelState(net.minecraft.client.resources.model.ModelState modelState, com.mojang.math.Transformation rootTransform)
    Returns a ModelState that combines the existing model state and the root transform.
    static List<net.minecraft.client.renderer.block.model.BlockElement>
    createUnbakedItemElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
     
    static List<net.minecraft.client.renderer.block.model.BlockElement>
    createUnbakedItemElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, @Nullable ExtraFaceData faceData)
    Creates a list of block elements in the shape of the specified sprite contents.
    static List<net.minecraft.client.renderer.block.model.BlockElement>
    createUnbakedItemMaskElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
     
    static List<net.minecraft.client.renderer.block.model.BlockElement>
    createUnbakedItemMaskElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, @Nullable ExtraFaceData faceData)
    Creates a list of block elements in the shape of the specified sprite contents.
    private static net.minecraft.client.renderer.block.model.BlockElementFace.UVs
    expandUVs(net.minecraft.client.renderer.block.model.BlockElementFace.UVs uvs, float expand)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ITEM_MODEL_GENERATOR

      private static final net.minecraft.client.renderer.block.model.ItemModelGenerator ITEM_MODEL_GENERATOR
  • Constructor Details

    • UnbakedElementsHelper

      private UnbakedElementsHelper()
  • Method Details

    • createUnbakedItemElements

      public static List<net.minecraft.client.renderer.block.model.BlockElement> createUnbakedItemElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
      See Also:
    • createUnbakedItemElements

      public static List<net.minecraft.client.renderer.block.model.BlockElement> createUnbakedItemElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, @Nullable @Nullable ExtraFaceData faceData)
      Creates a list of block elements in the shape of the specified sprite contents. These can later be baked using the same, or another texture.

      The Direction.NORTH and Direction.SOUTH faces take up the whole surface.

    • createUnbakedItemMaskElements

      public static List<net.minecraft.client.renderer.block.model.BlockElement> createUnbakedItemMaskElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
      See Also:
    • createUnbakedItemMaskElements

      public static List<net.minecraft.client.renderer.block.model.BlockElement> createUnbakedItemMaskElements(int layerIndex, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite, @Nullable @Nullable ExtraFaceData faceData)
      Creates a list of block elements in the shape of the specified sprite contents. These can later be baked using the same, or another texture.

      The Direction.NORTH and Direction.SOUTH faces take up only the pixels the texture uses.

    • expandUVs

      private static net.minecraft.client.renderer.block.model.BlockElementFace.UVs expandUVs(net.minecraft.client.renderer.block.model.BlockElementFace.UVs uvs, float expand)
    • bakeElements

      public static void bakeElements(net.minecraft.client.resources.model.QuadCollection.Builder builder, List<net.minecraft.client.renderer.block.model.BlockElement> elements, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState)
      Bakes a list of block elements and feeds the baked quads to a quad collection builder.
    • bakeElements

      public static List<net.minecraft.client.renderer.block.model.BakedQuad> bakeElements(List<net.minecraft.client.renderer.block.model.BlockElement> elements, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState)
      Bakes a list of block elements and returns the list of baked quads.
    • composeRootTransformIntoModelState

      public static net.minecraft.client.resources.model.ModelState composeRootTransformIntoModelState(net.minecraft.client.resources.model.ModelState modelState, com.mojang.math.Transformation rootTransform)
      Returns a ModelState that combines the existing model state and the root transform.
      Returns:
      a ModelState that combines the existing model state and the root transform