Package net.minecraft.client.texture
Class TextureStitcher
java.lang.Object
net.minecraft.client.texture.TextureStitcher
@Environment(CLIENT) public class TextureStitcher extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTextureStitcher.Holderstatic classTextureStitcher.Slotstatic interfaceTextureStitcher.SpriteConsumer -
Field Summary
Fields Modifier and Type Field Description private static Comparator<TextureStitcher.Holder>COMPARATORprivate intheightprivate Set<TextureStitcher.Holder>holdersprivate intmaxHeightprivate intmaxWidthprivate intmipLevelprivate List<TextureStitcher.Slot>slotsprivate intwidth -
Constructor Summary
Constructors Constructor Description TextureStitcher(int maxWidth, int maxHeight, int mipLevel) -
Method Summary
Modifier and Type Method Description voidadd(Sprite.Info info)private static intapplyMipLevel(int size, int mipLevel)private booleanfit(TextureStitcher.Holder holder)intgetHeight()voidgetStitchedSprites(TextureStitcher.SpriteConsumer spriteConsumer)intgetWidth()private booleangrowAndFit(TextureStitcher.Holder holder)voidstitch()
-
Field Details
-
COMPARATOR
-
mipLevel
private final int mipLevel -
holders
-
slots
-
width
private int width -
height
private int height -
maxWidth
private final int maxWidth -
maxHeight
private final int maxHeight
-
-
Constructor Details
-
TextureStitcher
public TextureStitcher(int maxWidth, int maxHeight, int mipLevel)
-
-
Method Details
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
add
-
stitch
public void stitch() -
getStitchedSprites
-
applyMipLevel
private static int applyMipLevel(int size, int mipLevel) -
fit
-
growAndFit
-