@@ -0,0 +1,3143 @@
+package org.cyclops.cyclopscore.helper;%0A%0Aimport net.minecraft.client.gui.Gui;%0Aimport net.minecraft.client.renderer.GlStateManager;%0Aimport net.minecraft.client.renderer.texture.TextureAtlasSprite;%0Aimport net.minecraft.client.renderer.texture.TextureMap;%0Aimport net.minecraft.util.EnumFacing;%0Aimport net.minecraft.util.ResourceLocation;%0Aimport net.minecraftforge.fluids.FluidStack;%0A%0Aimport javax.annotation.Nullable;%0A%0A/**%0A * Helpers related to guis.%0A */%0Apublic class GuiHelpers %7B%0A%0A    /**%0A     * Render a fluid tank in a gui.%0A     *%0A     * @param gui The gui to render in.%0A     * @param fluidStack The fluid to render.%0A     * @param capacity The tank capacity.%0A     * @param x The gui x position, including gui left.%0A     * @param y The gui y position, including gui top.%0A     * @param width The tank width.%0A     * @param height The tank height.%0A     */%0A    public static void renderFluidTank(Gui gui, @Nullable FluidStack fluidStack, int capacity,%0A                                       int x, int y, int width, int height) %7B%0A        if (fluidStack != null && capacity %3E 0) %7B%0A            int level = height * fluidStack.amount / capacity;%0A            TextureAtlasSprite icon = RenderHelpers.getFluidIcon(fluidStack, EnumFacing.UP);%0A            int verticalOffset = 0;%0A            while(level %3E 0) %7B%0A                int textureHeight;%0A                if(level %3E 16) %7B%0A                    textureHeight = 16;%0A                    level -= 16;%0A                %7D else %7B%0A                    textureHeight = level;%0A                    level = 0;%0A                %7D%0A%0A                RenderHelpers.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);%0A                gui.drawTexturedModalRect(x, y - textureHeight - verticalOffset + height, icon, width, textureHeight);%0A                verticalOffset = verticalOffset + 16;%0A            %7D%0A        %7D%0A    %7D%0A%0A    /**%0A     * Render a fluid tank in a gui with a tank overlay.%0A     * This assumes that the tank overlay has the provided width and height.%0A     *%0A     * @param gui The gui to render in.%0A     * @param fluidStack The fluid to render.%0A     * @param capacity The tank capacity.%0A     * @param x The gui x position, including gui left.%0A     * @param y The gui y position, including gui top.%0A     * @param width The tank width.%0A     * @param height The tank height.%0A     * @param textureOverlay The texture of the tank overlay.%0A     * @param overlayTextureX The overlay x texture position.%0A     * @param overlayTextureY The overlay y texture position.%0A     */%0A    public static void renderOverlayedFluidTank(Gui gui, @Nullable FluidStack fluidStack, int capacity,%0A                                                int x, int y, int width, int height,%0A                                                ResourceLocation textureOverlay, int overlayTextureX, int overlayTextureY) %7B%0A        renderFluidTank(gui, fluidStack, capacity, x, y, width, height);%0A        if (fluidStack != null && capacity %3E 0) %7B%0A            GlStateManager.enableBlend();%0A            RenderHelpers.bindTexture(textureOverlay);%0A            gui.drawTexturedModalRect(x, y, overlayTextureX, overlayTextureY, width, height);%0A        %7D%0A    %7D%0A%0A%7D%0A

Add helpers for rendering fluid tanks in guis