public class GuiHelper extends java.lang.Object implements IGuiHelper
Constructor and Description |
---|
GuiHelper(IIngredientManager ingredientManager,
Textures textures) |
Modifier and Type | Method and Description |
---|---|
IDrawableAnimated |
createAnimatedDrawable(IDrawableStatic drawable,
int ticksPerCycle,
IDrawableAnimated.StartDirection startDirection,
boolean inverted)
Creates an animated texture for a gui, revealing the texture over time.
|
IDrawableStatic |
createBlankDrawable(int width,
int height)
Returns a blank drawable for using as a blank recipe background.
|
ICraftingGridHelper |
createCraftingGridHelper(int craftInputSlot1)
Create a crafting grid helper.
|
<V> IDrawable |
createDrawableIngredient(V ingredient)
Returns a 16x16 drawable for the given ingredient, matching the one JEI draws in the ingredient list.
|
ITickTimer |
createTickTimer(int ticksPerCycle,
int maxValue,
boolean countDown)
Create a timer to help with rendering things that normally depend on ticks.
|
IDrawableBuilder |
drawableBuilder(net.minecraft.util.ResourceLocation resourceLocation,
int u,
int v,
int width,
int height)
Create a
IDrawableBuilder which gives more control over drawable creation. |
IDrawableStatic |
getSlotDrawable()
Returns a slot drawable for drawing extra slots on guis
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDrawable
public GuiHelper(IIngredientManager ingredientManager, Textures textures)
public IDrawableBuilder drawableBuilder(net.minecraft.util.ResourceLocation resourceLocation, int u, int v, int width, int height)
IGuiHelper
IDrawableBuilder
which gives more control over drawable creation.drawableBuilder
in interface IGuiHelper
IDrawableBuilder
with the given resource locationpublic IDrawableAnimated createAnimatedDrawable(IDrawableStatic drawable, int ticksPerCycle, IDrawableAnimated.StartDirection startDirection, boolean inverted)
IGuiHelper
createAnimatedDrawable
in interface IGuiHelper
drawable
- the underlying texture to drawticksPerCycle
- 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 IDrawableStatic getSlotDrawable()
IGuiHelper
getSlotDrawable
in interface IGuiHelper
public IDrawableStatic createBlankDrawable(int width, int height)
IGuiHelper
createBlankDrawable
in interface IGuiHelper
public <V> IDrawable createDrawableIngredient(V ingredient)
IGuiHelper
createDrawableIngredient
in interface IGuiHelper
public ICraftingGridHelper createCraftingGridHelper(int craftInputSlot1)
IGuiHelper
createCraftingGridHelper
in interface IGuiHelper
public ITickTimer createTickTimer(int ticksPerCycle, int maxValue, boolean countDown)
IGuiHelper
createTickTimer
in interface IGuiHelper
ticksPerCycle
- the number of ticks for timer to run before starting over at 0maxValue
- the number to count up to before starting over at 0countDown
- if true, the tick timer will count backwards from maxValue