Examples of TileSecurity


Examples of appeng.tile.misc.TileSecurity

  public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
  {
    if ( p.isSneaking() )
      return false;

    TileSecurity tg = getTileEntity( w, x, y, z );
    if ( tg != null )
    {
      if ( Platform.isClient() )
        return true;
View Full Code Here

Examples of appeng.tile.misc.TileSecurity

  }

  @Override
  public boolean renderInWorld(AEBaseBlock imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
  {
    TileSecurity sp = imb.getTileEntity( world, x, y, z );
    renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );

    ForgeDirection up = sp.getUp();

    preRenderInWorld( imb, world, x, y, z, renderer );

    boolean result = renderer.renderStandardBlock( imb, x, y, z );

    int b = world.getLightBrightnessForSkyBlocks( x + up.offsetX, y + up.offsetY, z + up.offsetZ, 0 );
    if ( sp.isActive() )
    {
      b = 15 << 20 | 15 << 4;
    }

    Tessellator.instance.setBrightness( b );
    Tessellator.instance.setColorOpaque_I( 0xffffff );
    renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );

    Tessellator.instance.setColorOpaque_I( sp.getColor().whiteVariant );
    IIcon ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Light.getIcon() : ExtraBlockTextures.MEChest.getIcon();
    renderFace( x, y, z, imb, ico, renderer, up );
    if ( sp.isActive() )
    {
      Tessellator.instance.setColorOpaque_I( sp.getColor().mediumVariant );
      ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Medium.getIcon() : ExtraBlockTextures.MEChest.getIcon();
      renderFace( x, y, z, imb, ico, renderer, up );

      Tessellator.instance.setColorOpaque_I( sp.getColor().blackVariant );
      ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Dark.getIcon() : ExtraBlockTextures.MEChest.getIcon();
      renderFace( x, y, z, imb, ico, renderer, up );
    }

    renderer.overrideBlockTexture = null;
    postRenderInWorld( renderer );
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.