Package crazypants.util

Examples of crazypants.util.BlockCoord


      return;
    }

    localInventory = new CompositeInventory();

    BlockCoord myLoc = new BlockCoord(this);
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      BlockCoord checkLoc = myLoc.getLocation(dir);
      TileEntity te = worldObj.getTileEntity(checkLoc.x, checkLoc.y, checkLoc.z);
      if(te instanceof IInventory && !(te instanceof TileHyperCube)) {
        localInventory.addInventory((IInventory) te, dir);
      }
    }
View Full Code Here


    if(toPush == null) {
      return null;
    }
    ItemStack result = toPush.copy();
    //TODO: need to cache this
    BlockCoord myLoc = new BlockCoord(this);
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      BlockCoord checkLoc = myLoc.getLocation(dir);
      TileEntity te = worldObj.getTileEntity(checkLoc.x, checkLoc.y, checkLoc.z);
      result.stackSize -= ItemUtil.doInsertItem(te, result, dir.getOpposite());
      if(result.stackSize <= 0) {
        return null;
      }
View Full Code Here

  private void checkReceptors() {
    if(!receptorsDirty) {
      return;
    }
    receptors.clear();
    BlockCoord bc = new BlockCoord(xCoord, yCoord, zCoord);
    ForgeDirection dir = ForgeDirection.DOWN;
    BlockCoord checkLoc = bc.getLocation(dir);
    TileEntity te = worldObj.getTileEntity(checkLoc.x, checkLoc.y, checkLoc.z);
    IPowerInterface pi = PowerHandlerUtil.create(te);
    if(pi != null) {
      receptors.add(new Receptor(pi, dir));
    }
View Full Code Here

    }
    return true;
  }

  private BlockCoord getLocation() {
    return new BlockCoord(this);
  }
View Full Code Here

  private void renderBlock(TileCapacitorBank te, double filledRatio, int meta) {
    RenderUtil.bindBlockTexture();
    Tessellator tes = Tessellator.instance;

    BlockCoord myBC;
    BlockCoord[] mb;
    if(te != null && te.isMultiblock()) {
      myBC = new BlockCoord(te);
      mb = te.multiblock;
    } else {
      myBC = DEFAULT_BC;
      mb = DEFAULT_MB;
    }
View Full Code Here

  private static final BlockCoord DEFAULT_BC = new BlockCoord(0, 0, 0);
  private static final BlockCoord[] DEFAULT_MB = new BlockCoord[] { DEFAULT_BC };

  static List<GaugeBounds> calculateGaugeBounds(BlockCoord me, BlockCoord[] mbIn) {

    BlockCoord myBC;
    BlockCoord[] mb;
    if(mbIn != null) {
      myBC = me;
      mb = mbIn;
    } else {
View Full Code Here

    }

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

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

      return false;
    }

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

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

    x += 18;
    fluidB = new IconButtonEIO(this, FLUID_MODE_BUTTON_ID, x, y, IconEIO.WRENCH_OVERLAY_FLUID);
    fluidB.setIconMargin(3, 3);

    x += 24;
    rsB = new RedstoneModeButton(this, 99, x, y, te, new BlockCoord(te));

    updateIoButtons();

    int w = 104;
    int h = 68;
View Full Code Here

  }

  @Override
  protected boolean doPull(ForgeDirection dir) {
    boolean res = super.doPull(dir);
    BlockCoord loc = getLocation().getLocation(dir);
    IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
    if(target != null) {
      FluidTankInfo[] infos = target.getTankInfo(dir.getOpposite());
      if(infos != null) {
        for (FluidTankInfo info : infos) {
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.