Package crazypants.enderio.conduit.geom

Examples of crazypants.enderio.conduit.geom.CollidableCache


    if(collidables != null && !collidablesDirty) {
      return collidables;
    }

    List<CollidableComponent> result = new ArrayList<CollidableComponent>();
    CollidableCache cc = CollidableCache.instance;

    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      Collection<CollidableComponent> col = getCollidables(dir);
      if(col != null) {
        result.addAll(col);
View Full Code Here


    //return getConectionMode(dir) == ConnectionMode.DISABLED;
    return false;
  }

  private Collection<CollidableComponent> getCollidables(ForgeDirection dir) {
    CollidableCache cc = CollidableCache.instance;
    Class<? extends IConduit> type = getCollidableType();
    if(isConnectedTo(dir) && getConnectionMode(dir) != ConnectionMode.DISABLED) {
      return cc.getCollidables(cc.createKey(type, getBundle().getOffset(getBaseConduitType(), dir), dir, renderStub(dir)), this);
    }
    return null;
  }
View Full Code Here

    }
    return true;
  }

  private void addConduitCores(List<CollidableComponent> result, IConduit con) {
    CollidableCache cc = CollidableCache.instance;
    Class<? extends IConduit> type = con.getCollidableType();
    if(con.hasConnections()) {
      for (ForgeDirection dir : con.getExternalConnections()) {
        result.addAll(cc.getCollidables(cc.createKey(type, getOffset(con.getBaseConduitType(), dir), ForgeDirection.UNKNOWN, false), con));
      }
      for (ForgeDirection dir : con.getConduitConnections()) {
        result.addAll(cc.getCollidables(cc.createKey(type, getOffset(con.getBaseConduitType(), dir), ForgeDirection.UNKNOWN, false), con));
      }
    } else {
      result.addAll(cc.getCollidables(cc.createKey(type, getOffset(con.getBaseConduitType(), ForgeDirection.UNKNOWN), ForgeDirection.UNKNOWN, false), con));
    }
  }
View Full Code Here

TOP

Related Classes of crazypants.enderio.conduit.geom.CollidableCache

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.