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 class
TextureStitcher.Holder
static class
TextureStitcher.Slot
static interface
TextureStitcher.SpriteConsumer
-
Field Summary
Fields Modifier and Type Field Description private static Comparator<TextureStitcher.Holder>
COMPARATOR
private int
height
private Set<TextureStitcher.Holder>
holders
private int
maxHeight
private int
maxWidth
private int
mipLevel
private List<TextureStitcher.Slot>
slots
private int
width
-
Constructor Summary
Constructors Constructor Description TextureStitcher(int maxWidth, int maxHeight, int mipLevel)
-
Method Summary
Modifier and Type Method Description void
add(Sprite.Info info)
private static int
applyMipLevel(int size, int mipLevel)
private boolean
fit(TextureStitcher.Holder holder)
int
getHeight()
void
getStitchedSprites(TextureStitcher.SpriteConsumer spriteConsumer)
int
getWidth()
private boolean
growAndFit(TextureStitcher.Holder holder)
void
stitch()
-
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
-