Search in sources :

Example 6 with IDrawableStatic

use of mezz.jei.api.gui.drawable.IDrawableStatic in project Electrodynamics by aurilisdev.

the class ModFurnaceRecipeCategory method draw.

@Override
public void draw(AbstractCookingRecipe recipe, PoseStack matrixStack, double mouseX, double mouseY) {
    List<IDrawableStatic> inputSlots = INPUT_SLOTS.getUnchecked(ANIMATION_LENGTH);
    IDrawableStatic image;
    ScreenObjectWrapper wrapper;
    for (int i = 0; i < inputSlots.size(); i++) {
        image = inputSlots.get(i);
        wrapper = inSlots[i];
        image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
    }
    List<IDrawableStatic> outputSlots = OUTPUT_SLOTS.getUnchecked(ANIMATION_LENGTH);
    for (int i = 0; i < outputSlots.size(); i++) {
        image = outputSlots.get(i);
        wrapper = outSlots[i];
        image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
    }
    List<IDrawableStatic> staticArrows = STATIC_ARROWS.getUnchecked(ANIMATION_LENGTH);
    for (int i = 0; i < staticArrows.size(); i++) {
        image = staticArrows.get(i);
        wrapper = this.staticArrows[i];
        image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
    }
    List<IDrawableAnimated> arrows = ANIMATED_ARROWS.getUnchecked(ANIMATION_LENGTH);
    IDrawableAnimated arrow;
    for (int i = 0; i < arrows.size(); i++) {
        arrow = arrows.get(i);
        wrapper = animArrows[i];
        arrow.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
    }
    addDescriptions(matrixStack);
}
Also used : IDrawableAnimated(mezz.jei.api.gui.drawable.IDrawableAnimated) IDrawableStatic(mezz.jei.api.gui.drawable.IDrawableStatic) ScreenObjectWrapper(electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)

Example 7 with IDrawableStatic

use of mezz.jei.api.gui.drawable.IDrawableStatic in project Electrodynamics by aurilisdev.

the class ElectrodynamicsRecipeCategory method drawStaticArrows.

public void drawStaticArrows(PoseStack matrixStack) {
    if (STATIC_ARROWS != null) {
        List<IDrawableStatic> arrows = STATIC_ARROWS.getUnchecked(getAnimationTime());
        IDrawableStatic image;
        ScreenObjectWrapper wrapper;
        for (int i = 0; i < arrows.size(); i++) {
            image = arrows.get(i);
            wrapper = staticArrows[i];
            image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
        }
    }
}
Also used : IDrawableStatic(mezz.jei.api.gui.drawable.IDrawableStatic) ScreenObjectWrapper(electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)

Example 8 with IDrawableStatic

use of mezz.jei.api.gui.drawable.IDrawableStatic in project Electrodynamics by aurilisdev.

the class ElectrodynamicsRecipeCategory method drawInputSlots.

public void drawInputSlots(PoseStack matrixStack) {
    if (INPUT_SLOTS != null) {
        List<IDrawableStatic> inputSlots = INPUT_SLOTS.getUnchecked(getAnimationTime());
        IDrawableStatic image;
        ScreenObjectWrapper wrapper;
        for (int i = 0; i < inputSlots.size(); i++) {
            image = inputSlots.get(i);
            wrapper = inSlots[i];
            image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
        }
    }
}
Also used : IDrawableStatic(mezz.jei.api.gui.drawable.IDrawableStatic) ScreenObjectWrapper(electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)

Example 9 with IDrawableStatic

use of mezz.jei.api.gui.drawable.IDrawableStatic in project Electrodynamics by aurilisdev.

the class ElectrodynamicsRecipeCategory method drawFluidInputs.

public void drawFluidInputs(PoseStack matrixStack) {
    if (FLUID_INPUTS != null) {
        List<IDrawableStatic> inFluidGauges = FLUID_INPUTS.getUnchecked(getAnimationTime());
        IDrawableStatic image;
        ScreenObjectWrapper wrapper;
        for (int i = 0; i < inFluidGauges.size(); i++) {
            image = inFluidGauges.get(i);
            wrapper = fluidInputs[i];
            image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
        }
    }
}
Also used : IDrawableStatic(mezz.jei.api.gui.drawable.IDrawableStatic) ScreenObjectWrapper(electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)

Example 10 with IDrawableStatic

use of mezz.jei.api.gui.drawable.IDrawableStatic in project Electrodynamics by aurilisdev.

the class ElectrodynamicsRecipeCategory method drawOutputSlots.

public void drawOutputSlots(PoseStack matrixStack) {
    if (OUTPUT_SLOTS != null) {
        List<IDrawableStatic> outputSlots = OUTPUT_SLOTS.getUnchecked(getAnimationTime());
        IDrawableStatic image;
        ScreenObjectWrapper wrapper;
        for (int i = 0; i < outputSlots.size(); i++) {
            image = outputSlots.get(i);
            wrapper = outSlots[i];
            image.draw(matrixStack, wrapper.getXPos(), wrapper.getYPos());
        }
    }
}
Also used : IDrawableStatic(mezz.jei.api.gui.drawable.IDrawableStatic) ScreenObjectWrapper(electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)

Aggregations

IDrawableStatic (mezz.jei.api.gui.drawable.IDrawableStatic)13 ScreenObjectWrapper (electrodynamics.compatibility.jei.utils.gui.ScreenObjectWrapper)12 CacheLoader (com.google.common.cache.CacheLoader)6 ArrayList (java.util.ArrayList)6 ResourceLocation (net.minecraft.resources.ResourceLocation)6 Matrix4f (com.mojang.math.Matrix4f)1 IDrawableAnimated (mezz.jei.api.gui.drawable.IDrawableAnimated)1 GameRenderer (net.minecraft.client.renderer.GameRenderer)1 NotNull (org.jetbrains.annotations.NotNull)1