public class DrawableBuilder extends java.lang.Object implements IDrawableBuilder
Constructor and Description |
---|
DrawableBuilder(net.minecraft.util.ResourceLocation resourceLocation,
int u,
int v,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
IDrawableBuilder |
addPadding(int paddingTop,
int paddingBottom,
int paddingLeft,
int paddingRight)
Add extra blank space around the texture by adjusting the padding.
|
IDrawableStatic |
build()
Creates a normal, non-animated drawable.
|
IDrawableAnimated |
buildAnimated(int ticksPerCycle,
IDrawableAnimated.StartDirection startDirection,
boolean inverted)
Creates an animated texture for a gui, revealing the texture over time.
|
IDrawableAnimated |
buildAnimated(ITickTimer tickTimer,
IDrawableAnimated.StartDirection startDirection)
Creates an animated texture for a gui, revealing the texture over time.
|
IDrawableBuilder |
setTextureSize(int width,
int height)
For textures that are not 256x256, specify the size.
|
IDrawableBuilder |
trim(int trimTop,
int trimBottom,
int trimLeft,
int trimRight)
Remove blank space around the texture by trimming it.
|
public DrawableBuilder(net.minecraft.util.ResourceLocation resourceLocation, int u, int v, int width, int height)
public IDrawableBuilder setTextureSize(int width, int height)
IDrawableBuilder
setTextureSize
in interface IDrawableBuilder
public IDrawableBuilder addPadding(int paddingTop, int paddingBottom, int paddingLeft, int paddingRight)
IDrawableBuilder
addPadding
in interface IDrawableBuilder
public IDrawableBuilder trim(int trimTop, int trimBottom, int trimLeft, int trimRight)
IDrawableBuilder
trim
in interface IDrawableBuilder
public IDrawableStatic build()
IDrawableBuilder
build
in interface IDrawableBuilder
public IDrawableAnimated buildAnimated(int ticksPerCycle, IDrawableAnimated.StartDirection startDirection, boolean inverted)
IDrawableBuilder
buildAnimated
in interface IDrawableBuilder
ticksPerCycle
- the number of ticks for the animation to run before starting overstartDirection
- the direction that the animation starts drawing the textureinverted
- when inverted is true, the texture will start fully drawn and be hidden over timepublic IDrawableAnimated buildAnimated(ITickTimer tickTimer, IDrawableAnimated.StartDirection startDirection)
IDrawableBuilder
buildAnimated
in interface IDrawableBuilder
tickTimer
- a custom tick timer, used for advanced control over the animationstartDirection
- the direction that the animation starts drawing the texture