Examples of TileEntitySolar


Examples of micdoodle8.mods.galacticraft.core.tile.TileEntitySolar

    @Override
    public TileEntity createTileEntity(World world, int metadata)
    {
        if (metadata >= BlockSolar.ADVANCED_METADATA)
        {
            return new TileEntitySolar(2);
        }
        else
        {
            return new TileEntitySolar(1);
        }
    }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.core.tile.TileEntitySolar

    public ModelSolarPanel model = new ModelSolarPanel();

    @Override
    public void renderTileEntityAt(TileEntity var1, double par2, double par4, double par6, float var8)
    {
        TileEntitySolar panel = (TileEntitySolar) var1;

        if (var1.getBlockMetadata() >= BlockSolar.ADVANCED_METADATA)
        {
            this.bindTexture(TileEntitySolarPanelRenderer.solarPanelAdvTexture);
        }
        else
        {
            this.bindTexture(TileEntitySolarPanelRenderer.solarPanelTexture);
        }

        GL11.glPushMatrix();
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glTranslatef((float) par2, (float) par4, (float) par6);

        GL11.glTranslatef(0.5F, 1.0F, 0.5F);
        this.model.renderPole();
        GL11.glTranslatef(0.0F, 1.5F, 0.0F);

        GL11.glRotatef(180.0F, 0, 0, 1);
        GL11.glRotatef(-90.0F, 0, 1, 0);

        float celestialAngle = (panel.getWorldObj().getCelestialAngle(1.0F) - 0.784690560F) * 360.0F;
        float celestialAngle2 = panel.getWorldObj().getCelestialAngle(1.0F) * 360.0F;

        GL11.glRotatef(panel.currentAngle - (celestialAngle - celestialAngle2), 1.0F, 0.0F, 0.0F);

        this.model.renderPanel();

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.