Package appeng.helpers

Examples of appeng.helpers.IInterfaceHost


      {
        for (IGridNode gn : g.getMachines( TileInterface.class ))
        {
          if ( gn.isActive() )
          {
            IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
            if ( ih.getInterfaceDuality().getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.NO )
              continue;

            InvTracker t = diList.get( ih );

            if ( t == null )
              missing = true;
            else
            {
              DualityInterface dual = ih.getInterfaceDuality();
              if ( !t.unlocalizedName.equals( dual.getTermName() ) )
                missing = true;
            }

            total++;
          }
        }

        for (IGridNode gn : g.getMachines( PartInterface.class ))
        {
          if ( gn.isActive() )
          {
            IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
            if ( ih.getInterfaceDuality().getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.NO )
              continue;

            InvTracker t = diList.get( ih );

            if ( t == null )
              missing = true;
            else
            {
              DualityInterface dual = ih.getInterfaceDuality();
              if ( !t.unlocalizedName.equals( dual.getTermName() ) )
                missing = true;
            }

            total++;
View Full Code Here


      IGridNode agn = host.getActionableNode();
      if ( agn != null && agn.isActive() )
      {
        for (IGridNode gn : g.getMachines( TileInterface.class ))
        {
          IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
          DualityInterface dual = ih.getInterfaceDuality();
          if ( gn.isActive() && dual.getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.YES )
            diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
        }

        for (IGridNode gn : g.getMachines( PartInterface.class ))
        {
          IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
          DualityInterface dual = ih.getInterfaceDuality();
          if ( gn.isActive() && dual.getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.YES )
            diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
        }
      }
    }
View Full Code Here

    return handler;
  }

  private void checkInterfaceVsStorageBus(TileEntity target, ForgeDirection side)
  {
    IInterfaceHost achievement = null;

    if ( target instanceof IInterfaceHost )
      achievement = (IInterfaceHost) target;

    if ( target instanceof IPartHost )
    {
      Object part = ((IPartHost) target).getPart( side );
      if ( part instanceof IInterfaceHost )
        achievement = (IInterfaceHost) part;
    }

    if ( achievement != null )
    {
      Platform.addStat( achievement.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
      //Platform.addStat( getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
    }
  }
View Full Code Here

TOP

Related Classes of appeng.helpers.IInterfaceHost

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.