Examples of TileSkyCompass


Examples of appeng.tile.misc.TileSkyCompass

  }

  @Override
  public boolean isValidOrientation(World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up)
  {
    TileSkyCompass sc = getTileEntity( w, x, y, z );
    if ( sc != null )
      return false;
    return canPlaceAt( w, x, y, z, forward.getOpposite() );
  }
View Full Code Here

Examples of appeng.tile.misc.TileSkyCompass

  }

  @Override
  public void onNeighborBlockChange(World w, int x, int y, int z, Block id)
  {
    TileSkyCompass sc = getTileEntity( w, x, y, z );
    ForgeDirection up = sc.getForward();
    if ( !canPlaceAt( w, x, y, z, up.getOpposite() ) )
      dropTorch( w, x, y, z );
  }
View Full Code Here

Examples of appeng.tile.misc.TileSkyCompass

  }

  @Override
  public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
  {
    TileSkyCompass tile = getTileEntity( w, x, y, z );
    if ( tile != null )
    {
      ForgeDirection forward = tile.getForward();

      double minX = 0;
      double minY = 0;
      double minZ = 0;
      double maxX = 1;
View Full Code Here

Examples of appeng.tile.misc.TileSkyCompass

  public void renderTile(AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer)
  {
    if ( !(tile instanceof TileSkyCompass) )
      return;

    TileSkyCompass skyCompass = (TileSkyCompass) tile;

    if ( !skyCompass.hasWorldObj() )
      return;

    GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */);
    GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );

    ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );

    Minecraft.getMinecraft().getTextureManager().bindTexture( loc );

    this.applyTESRRotation( x, y, z, skyCompass.getUp(), skyCompass.getForward() );

    GL11.glScalef( 1.0F, -1F, -1F );
    GL11.glTranslatef( 0.5F, -1.5F, -0.5F );

    long now = System.currentTimeMillis();

    CompassResult cr = null;
    if ( skyCompass.getForward() == ForgeDirection.UP || skyCompass.getForward() == ForgeDirection.DOWN )
      cr = CompassManager.instance.getCompassDirection( 0, tile.xCoord, tile.yCoord, tile.zCoord );
    else
      cr = new CompassResult( false, true, 0 );

    if ( cr.hasResult )
    {
      if ( cr.spin )
      {
        now = now % 100000;
        model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
      }
      else
        model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) );

    }
    else
    {
      now = now % 1000000;
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.