Examples of FlippableIcon


Examples of appeng.client.texture.FlippableIcon

    int b = world.getLightBrightnessForSkyBlocks( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ, 0 );
    Tessellator.instance.setBrightness( b );
    Tessellator.instance.setColorOpaque_I( 0xffffff );

    FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
    if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
      flippableIcon.setFlip( true, false );
    else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )
      flippableIcon.setFlip( false, true );
    else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST )
      flippableIcon.setFlip( true, false );
    else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST )
      flippableIcon.setFlip( false, true );
    else if ( forward == ForgeDirection.DOWN )
      flippableIcon.setFlip( true, false );

    /*
     * 1.7.2
     *
     * else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); else if (
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

        renderer.uvRotateTop = 1;
        renderer.uvRotateSouth = 0;
        renderer.uvRotateNorth = 0;

        AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
        FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST );
        ico.setFlip( false, true );

        renderer.setRenderBounds( 0, 3 / 16.0, 3 / 16.0, 16 / 16.0, 13 / 16.0, 13 / 16.0 );
        rh.renderBlockCurrentBounds( x, y, z, renderer );

        Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );

        FlippableIcon fpA = new FlippableIcon( firstIcon );
        FlippableIcon fpB = new FlippableIcon( secondIcon );

        fpA.setFlip( true, false );
        fpB.setFlip( true, false );

        Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
        rh.setTexture( firstOffset, firstOffset, firstOffset, firstOffset, firstIcon, fpA );
        renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

          IIcon secondIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );

          if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
          {
            AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
            FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST );
            ico.setFlip( false, true );
          }

          Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
          Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
          rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
          renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );

          Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
          rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
          renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );

          renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;

          rh.setTexture( getTexture( getCableColor() ) );
        }
      }
    }

    if ( sides.size() != 2 || !nonLinear( sides ) || hasBuses )
    {
      for (ForgeDirection of : connections)
      {
        renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
      }

      rh.setTexture( getCoveredTexture( getCableColor() ) );
      rh.setBounds( 5, 5, 5, 11, 11, 11 );
      rh.renderBlock( x, y, z, renderer );
    }
    else
    {
      ForgeDirection selectedSide = ForgeDirection.UNKNOWN;

      for (ForgeDirection of : connections)
      {
        selectedSide = of;
        break;
      }

      int channels = channelsOnSide[selectedSide.ordinal()];
      IIcon def = getTexture( getCableColor() );
      IIcon off = new OffsetIcon( def, 0, -12 );

      IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
      IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 );

      IIcon secondTaughtIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
      IIcon secondOffsetIcon = new OffsetIcon( secondTaughtIcon, 0, -12 );

      switch (selectedSide)
      {
      case DOWN:
      case UP:
        renderer.setRenderBounds( 5 / 16.0, 0, 5 / 16.0, 11 / 16.0, 16 / 16.0, 11 / 16.0 );
        rh.setTexture( def, def, off, off, off, off );
        rh.renderBlockCurrentBounds( x, y, z, renderer );

        renderer.uvRotateTop = 0;
        renderer.uvRotateBottom = 0;
        renderer.uvRotateSouth = 3;
        renderer.uvRotateEast = 3;

        Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );

        Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
        rh.setTexture( firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon );
        renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );

        Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
        rh.setTexture( secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon );
        renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
        break;
      case EAST:
      case WEST:
        rh.setTexture( off, off, off, off, def, def );
        renderer.uvRotateEast = 2;
        renderer.uvRotateWest = 1;
        renderer.uvRotateBottom = 2;
        renderer.uvRotateTop = 1;
        renderer.uvRotateSouth = 0;
        renderer.uvRotateNorth = 0;

        AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
        FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST );
        ico.setFlip( false, true );

        renderer.setRenderBounds( 0, 5 / 16.0, 5 / 16.0, 16 / 16.0, 11 / 16.0, 11 / 16.0 );
        rh.renderBlockCurrentBounds( x, y, z, renderer );

        Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );

        FlippableIcon fpA = new FlippableIcon( firstTaughtIcon );
        FlippableIcon fpB = new FlippableIcon( secondTaughtIcon );

        fpA = new FlippableIcon( firstTaughtIcon );
        fpB = new FlippableIcon( secondTaughtIcon );

        fpA.setFlip( true, false );
        fpB.setFlip( true, false );

        Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
        rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, fpA );
        renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

      IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );

      if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
      {
        AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
        FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST );
        ico.setFlip( false, true );
      }

      Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
      Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
      rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

      IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );

      if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
      {
        AEBaseBlock blk = (AEBaseBlock) rh.getBlock();
        FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST );
        ico.setFlip( false, true );
      }

      Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
      Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
      rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

        resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", "textures/blocks",
            resLoc.getResourcePath(), ".png" ) );

        IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
        if ( res != null )
          return new FlippableIcon( ir.registerIcon( Name ) );
      }
      catch (Throwable e)
      {
        return new FlippableIcon( substitute );
      }
    }

    return new FlippableIcon( ir.registerIcon( Name ) );
  }
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

  @Override
  @SideOnly(Side.CLIENT)
  public void registerBlockIcons(IIconRegister iconRegistry)
  {
    BlockRenderInfo info = getRendererInstance();
    FlippableIcon topIcon;
    FlippableIcon bottomIcon;
    FlippableIcon sideIcon;
    FlippableIcon eastIcon;
    FlippableIcon westIcon;
    FlippableIcon southIcon;
    FlippableIcon northIcon;

    this.blockIcon = topIcon = optionalIcon( iconRegistry, this.getTextureName(), null );
    bottomIcon = optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon );
    sideIcon = optionalIcon( iconRegistry, this.getTextureName() + "Side", topIcon );
    eastIcon = optionalIcon( iconRegistry, this.getTextureName() + "East", sideIcon );
View Full Code Here

Examples of appeng.client.texture.FlippableIcon

  }

  public void registerNoIcons()
  {
    BlockRenderInfo info = getRendererInstance();
    FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
    info.updateIcons( i, i, i, i, i, i );
  }
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.