Class UnbakedElementsHelper
java.lang.Object
net.neoforged.neoforge.client.model.UnbakedElementsHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final net.minecraft.client.renderer.block.model.ItemModelGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 aModelState
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)
-
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
andDirection.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
andDirection.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 aModelState
that combines the existing model state and the root transform.- Returns:
- a
ModelState
that combines the existing model state and the root transform
-