Package mods.railcraft.common.blocks.machine.beta

Examples of mods.railcraft.common.blocks.machine.beta.TileTankIronValve


    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
        if (!((TileMultiBlock) tile).isStructureValid())
            return;

        if (tile instanceof TileTankIronValve) {
            TileTankIronValve valve = (TileTankIronValve) tile;

            if (valve.isFilling()) {
                StandardTank tank = valve.getFillTank();
                FluidStack fluidStack = tank.getFluid();
                if (fluidStack != null && fluidStack.amount > 0 && fluidStack.getFluid() != null) {
                    GL11.glPushMatrix();
                    if (valve.getPattern().getPatternMarkerChecked(valve.getPatternPositionX(), valve.getPatternPositionY() - 1, valve.getPatternPositionZ()) == 'A') {

                        prepFillTexture(fluidStack);

                        int height = getTankHeight(valve);
                        float yOffset = height / 2f;
                        float vScale = height - 2f;
                        GL11.glTranslatef((float) x + 0.5F, (float) y + yOffset - height + 1, (float) z + 0.5F);
                        GL11.glScalef(1f, vScale, 1f);

                        draw(tank);
                    } else if (valve.getPattern().getPatternMarkerChecked(valve.getPatternPositionX() - 1, valve.getPatternPositionY(), valve.getPatternPositionZ()) == 'A') {

                        prepFillTexture(fluidStack);

                        float vScale = getVerticalScaleSide(valve);
                        float yOffset = 0.5f - vScale / 2f + RenderTools.PIXEL * 3;
                        GL11.glTranslatef((float) x - 0.5F + RenderTools.PIXEL * 5, (float) y + yOffset, (float) z + 0.5F);
                        GL11.glScalef(1f, vScale, 1f);

                        draw(tank);
                    } else if (valve.getPattern().getPatternMarkerChecked(valve.getPatternPositionX() + 1, valve.getPatternPositionY(), valve.getPatternPositionZ()) == 'A') {

                        prepFillTexture(fluidStack);

                        float vScale = getVerticalScaleSide(valve);
                        float yOffset = 0.5f - vScale / 2f + RenderTools.PIXEL * 3;
                        GL11.glTranslatef((float) x + 1.5F - RenderTools.PIXEL * 5, (float) y + yOffset, (float) z + 0.5F);
                        GL11.glScalef(1f, vScale, 1f);

                        draw(tank);
                    } else if (valve.getPattern().getPatternMarkerChecked(valve.getPatternPositionX(), valve.getPatternPositionY(), valve.getPatternPositionZ() - 1) == 'A') {

                        prepFillTexture(fluidStack);

                        float vScale = getVerticalScaleSide(valve);
                        float yOffset = 0.5f - vScale / 2f + RenderTools.PIXEL * 3;
                        GL11.glTranslatef((float) x + 0.5F, (float) y + yOffset, (float) z - 0.5F + RenderTools.PIXEL * 5);
                        GL11.glScalef(1f, vScale, 1f);

                        draw(tank);
                    } else if (valve.getPattern().getPatternMarkerChecked(valve.getPatternPositionX(), valve.getPatternPositionY(), valve.getPatternPositionZ() + 1) == 'A') {

                        prepFillTexture(fluidStack);

                        float vScale = getVerticalScaleSide(valve);
                        float yOffset = 0.5f - vScale / 2f + RenderTools.PIXEL * 3;
 
View Full Code Here

TOP

Related Classes of mods.railcraft.common.blocks.machine.beta.TileTankIronValve

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.