Package crazypants.util

Examples of crazypants.util.BlockCoord


      this.coord = coord;
      this.isDiagnal = isDiagnal;
    }

    NodeEntry(TileLightNode node) {
      coord = new BlockCoord(node);
      isDiagnal = node.isDiagnal;
    }
View Full Code Here


      return false;
    }

    @Override
    public boolean isAirBlock(int var1, int var2, int var3) {
      if(!configurables.contains(new BlockCoord(var1,var2,var3))) {
        return false;
      }
      return super.isAirBlock(var1, var2, var3);
    }
View Full Code Here

      return 15 << 20 | 15 << 4;
    }

    @Override
    public Block getBlock(int var1, int var2, int var3) {
      if(!configurables.contains(new BlockCoord(var1,var2,var3))) {
        return Blocks.air;
      }
      return super.getBlock(var1, var2, var3);
    }
View Full Code Here

    }

    boolean res = super.doPush(dir);
    if(tank.getFluidAmount() > 0) {

      BlockCoord loc = getLocation().getLocation(dir);
      IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
      if(target != null) {
        if(target.canFill(dir.getOpposite(), tank.getFluid().getFluid())) {
          FluidStack push = tank.getFluid().copy();
          push.amount = Math.min(push.amount, IO_MB_TICK);
View Full Code Here

      return false;
    }

    boolean res = super.doPull(dir);
    if(tank.getFluidAmount() < tank.getCapacity()) {
      BlockCoord loc = getLocation().getLocation(dir);
      IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
      if(target != null) {

        if(tank.getFluidAmount() > 0) {
          FluidStack canPull = tank.getFluid().copy();
View Full Code Here

    if(!receptorsDirty) {
      return;
    }
    receptors.clear();
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      BlockCoord checkLoc = bc.getLocation(dir);
      TileEntity te = worldObj.getTileEntity(checkLoc.x, checkLoc.y, checkLoc.z);
      IPowerInterface pi = PowerHandlerUtil.create(te);
      if(pi != null && pi.canConduitConnect(dir.getOpposite())) {       
        receptors.add(new Receptor(pi, dir));
      }
View Full Code Here

  }

  //private PowerDistributor powerDis;
  private boolean transmitEnergy() {
    if(powerDis == null) {
      powerDis = new PowerDistributor(new BlockCoord(this));
    }
    int canTransmit = Math.min(getEnergyStored(), getPowerUsePerTick() * 2);
    if(canTransmit <= 0) {
      return false;
    }
View Full Code Here

      tankNeighbours = new ArrayList<TankNeighbour>();
    }
    tankNeighbours.clear();
    for (BlockCoord bc : multiblock) {
      for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
        BlockCoord check = bc.getLocation(dir);
        if(!inMultiblock(check)) {
          IFluidHandler tc = getTankContainer(check);
          if(tc != null) {
            tankNeighbours.add(new TankNeighbour(tc, dir.getOpposite()));
          }
View Full Code Here

    if(nbtRoot.getBoolean("isMultiblock")) {
      int[] coords = nbtRoot.getIntArray("multiblock");
      multiblock = new BlockCoord[4];
      int c = 0;
      for (int i = 0; i < 4; i++) {
        multiblock[i] = new BlockCoord(coords[c++], coords[c++], coords[c++]);
      }

      if(isMaster() && autoEject) {
        updateTankNeighbours();
      }
View Full Code Here

      right = ForgeDirection.EAST;
      up = ForgeDirection.NORTH;
    }

    boolean isRight = false;
    BlockCoord myCoord = new BlockCoord(this);
    for (BlockCoord bc : multiblock) {
      if(isInDir(myCoord, right, bc)) {
        isRight = true;
      }
    }
View Full Code Here

TOP

Related Classes of crazypants.util.BlockCoord

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.