Search in sources :

Example 6 with MultiblockProcess

use of blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcess in project ImmersiveEngineering by BluSunrize.

the class GuiArcFurnace method drawGuiContainerBackgroundLayer.

@Override
protected void drawGuiContainerBackgroundLayer(float f, int mx, int my) {
    GlStateManager.color(1, 1, 1, 1);
    ClientUtils.bindTexture(texture);
    this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
    for (MultiblockProcess process : tile.processQueue) if (process instanceof MultiblockProcessInMachine) {
        float mod = process.processTick / (float) process.maxTicks;
        int slot = ((MultiblockProcessInMachine) process).getInputSlots()[0];
        int h = (int) Math.max(1, mod * 16);
        this.drawTexturedModalRect(guiLeft + 27 + slot % 3 * 21, guiTop + 34 + slot / 3 * 18 + (16 - h), 176, 16 - h, 2, h);
    }
    int stored = (int) (46 * (tile.getEnergyStored(null) / (float) tile.getMaxEnergyStored(null)));
    ClientUtils.drawGradientRect(guiLeft + 157, guiTop + 22 + (46 - stored), guiLeft + 164, guiTop + 68, 0xffb51500, 0xff600b00);
}
Also used : MultiblockProcess(blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcess) MultiblockProcessInMachine(blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcessInMachine)

Aggregations

MultiblockProcess (blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcess)6 MultiblockProcessInWorld (blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcessInWorld)4 IBlockState (net.minecraft.block.state.IBlockState)4 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)4 ItemStack (net.minecraft.item.ItemStack)4 BlockPos (net.minecraft.util.math.BlockPos)4 BlueprintCraftingRecipe (blusunrize.immersiveengineering.api.crafting.BlueprintCraftingRecipe)2 IMultiblockRecipe (blusunrize.immersiveengineering.api.crafting.IMultiblockRecipe)2 MultiblockProcessInMachine (blusunrize.immersiveengineering.common.blocks.metal.TileEntityMultiblockMetal.MultiblockProcessInMachine)2 List (java.util.List)2 EnumFacing (net.minecraft.util.EnumFacing)2 FluidStack (net.minecraftforge.fluids.FluidStack)1