Package appeng.tile.crafting

Examples of appeng.tile.crafting.TileCraftingTile


  }

  @Override
  public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
  {
    TileCraftingTile tg = getTileEntity( w, x, y, z );
    if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
    {
      if ( Platform.isClient() )
        return true;

      Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
View Full Code Here


  }

  @Override
  public void breakBlock(World w, int x, int y, int z, Block a, int b)
  {
    TileCraftingTile cp = getTileEntity( w, x, y, z );
    if ( cp != null )
      cp.breakCluster();

    super.breakBlock( w, x, y, z, a, b );
  }
View Full Code Here

  }

  @Override
  public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
  {
    TileCraftingTile cp = getTileEntity( w, x, y, z );
    if ( cp != null )
      cp.updateMultiBlock();
  }
View Full Code Here

  {
    IIcon theIcon = null;
    boolean formed = false;
    boolean emitsLight = false;

    TileCraftingTile ct = blk.getTileEntity( w, x, y, z );
    if ( ct != null && ct.isFormed() )
    {
      formed = true;
      emitsLight = ct.isPowered();
    }
    int meta = w.getBlockMetadata( x, y, z ) & 3;

    boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
    theIcon = blk.getIcon( ForgeDirection.SOUTH.ordinal(), meta | (formed ? 8 : 0) );

    IIcon nonForward = theIcon;
    if ( isMonitor )
      nonForward = AEApi.instance().blocks().blockCraftingUnit.block().getIcon( 0, meta | (formed ? 8 : 0) );

    if ( formed && renderer.overrideBlockTexture == null )
    {
      renderer = BusRenderer.instance.renderer;
      BusRenderHelper i = BusRenderHelper.instance;
      BusRenderer.instance.renderer.isFacade = true;

      renderer.blockAccess = w;
      i.setPass( 0 );
      i.setOrientation( ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );

      try
      {
        ct.lightCache = i.useSimplifiedRendering( x, y, z, null, ct.lightCache );
      }
      catch (Throwable ignored)
      {

      }

      float highX = isConnected( w, x, y, z, ForgeDirection.EAST ) ? 16 : 13.01f;
      float lowX = isConnected( w, x, y, z, ForgeDirection.WEST ) ? 0 : 2.99f;

      float highY = isConnected( w, x, y, z, ForgeDirection.UP ) ? 16 : 13.01f;
      float lowY = isConnected( w, x, y, z, ForgeDirection.DOWN ) ? 0 : 2.99f;

      float highZ = isConnected( w, x, y, z, ForgeDirection.SOUTH ) ? 16 : 13.01f;
      float lowZ = isConnected( w, x, y, z, ForgeDirection.NORTH ) ? 0 : 2.99f;

      renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.NORTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.SOUTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.NORTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.SOUTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.NORTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.SOUTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.NORTH );
      renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.SOUTH );

      for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
      {
        i.setBounds( fso( side, lowX, ForgeDirection.WEST ), fso( side, lowY, ForgeDirection.DOWN ), fso( side, lowZ, ForgeDirection.NORTH ),
            fso( side, highX, ForgeDirection.EAST ), fso( side, highY, ForgeDirection.UP ), fso( side, highZ, ForgeDirection.SOUTH ) );
        i.prepareBounds( renderer );

        boolean LocalEmit = emitsLight;
        if ( blk instanceof BlockCraftingMonitor && !ct.getForward().equals( side ) )
          LocalEmit = false;

        handleSide( blk, meta, x, y, z, i, renderer, ct.getForward().equals( side ) ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
      }

      BusRenderer.instance.renderer.isFacade = false;
      i.setFacesToRender( EnumSet.allOf( ForgeDirection.class ) );
      i.normalRendering();
View Full Code Here

    return out;
  }

  public void done()
  {
    TileCraftingTile core = getCore();

    core.isCoreBlock = true;

    if ( core.previousState != null )
    {
View Full Code Here

    }
  }

  public boolean isActive()
  {
    TileCraftingTile core = getCore();
    if ( core == null )
      return false;

    IGridNode node = core.getActionableNode();
    if ( node == null )
      return false;

    return node.isActive();
  }
View Full Code Here

    return wat != null && wat.getStackSize() > 0;
  }

  public void breakCluster()
  {
    TileCraftingTile t = getCore();
    if ( t != null )
      t.breakCluster();
  }
View Full Code Here

    {
      for (int y = min.y; y <= max.y; y++)
      {
        for (int z = min.z; z <= max.z; z++)
        {
          TileCraftingTile te = (TileCraftingTile) w.getTileEntity( x, y, z );
          te.updateStatus( c );
          c.addTile( te );
        }
      }
    }
View Full Code Here

TOP

Related Classes of appeng.tile.crafting.TileCraftingTile

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.