Package crazypants.util

Examples of crazypants.util.BlockCoord


        if(leftOvers > 0) {
          f.amount += 1;
          leftOvers--;
        }
        con.getTank().setLiquid(f);
        BlockCoord bc = con.getLocation();
        con.getBundle().getEntity().getWorldObj().markTileEntityChunkModified(bc.x, bc.y, bc.z, con.getBundle().getEntity());
      }

    }
  }
View Full Code Here


    }
    return null;
  }

  public IFluidHandler getTankContainer(AdvancedLiquidConduit con, ForgeDirection dir) {
    BlockCoord bc = con.getLocation().getLocation(dir);
    return getTankContainer(bc);
  }
View Full Code Here

  public void powerReceptorAdded(IPowerConduit powerConduit, ForgeDirection direction, int x, int y, int z, IPowerInterface powerReceptor) {
    if(powerReceptor == null) {
      return;
    }
    BlockCoord location = new BlockCoord(x, y, z);
    ReceptorKey key = new ReceptorKey(location, direction);
    ReceptorEntry re = powerReceptors.get(key);
    if(re == null) {
      re = new ReceptorEntry(powerReceptor, location, powerConduit, direction);
      powerReceptors.put(key, re);
View Full Code Here

      powerManager.receptorsChanged();
    }
  }

  public void powerReceptorRemoved(int x, int y, int z) {
    BlockCoord bc = new BlockCoord(x, y, z);
    List<ReceptorKey> remove = new ArrayList<ReceptorKey>();
    for (ReceptorKey key : powerReceptors.keySet()) {
      if(key != null && key.coord.equals(bc)) {
        remove.add(key);
      }
View Full Code Here

      stateDirty = false;
    }
  }

  private void doExtract() {
    BlockCoord loc = getLocation();
    if(!hasConnectionMode(ConnectionMode.INPUT)) {
      return;
    }
    if(network == null) {
      return;
View Full Code Here

    } else if((lastSyncRatio != tank.getFilledRatio() && world.getTotalWorldTime() % 2 == 0)) {

      //need to send a custom packet as we don't want want to trigger a full chunk update, just
      //need to get the required  values to the entity renderer
      BlockCoord loc = getLocation();
      PacketHandler.INSTANCE.sendToAllAround(new PacketFluidLevel(this), new TargetPoint(world.provider.dimensionId, loc.x, loc.y, loc.z, 64));
      lastSyncRatio = tank.getFilledRatio();
    }
  }
View Full Code Here

    dataRoot.setShort("extractionRedstoneMode", (short)getExtractionRedstoneMode(dir).ordinal());
  }

  private void doExtract() {

    BlockCoord loc = getLocation();
    if(!hasConnectionMode(ConnectionMode.INPUT)) {
      return;
    }

    // assume failure, reset to 0 if we do extract
View Full Code Here

  @Override
  protected void actionPerformed(GuiButton b) {
    ForgeDirection dir = ForgeDirection.values()[b.id];
    EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
    BlockCoord loc = cb.getLocation();
    PacketHandler.INSTANCE.sendToServer(new PacketOpenConduitUI(cb.getEntity(), dir));
    player.openGui(EnderIO.instance, GuiHandler.GUI_ID_EXTERNAL_CONNECTION_BASE + dir.ordinal(), player.worldObj, loc.x, loc.y, loc.z);
  }
View Full Code Here

    return false;
  }

  public static <T extends IConduit> void disconectConduits(T con, ForgeDirection connDir) {
    con.conduitConnectionRemoved(connDir);
    BlockCoord loc = con.getLocation().getLocation(connDir);
    IConduit neighbour = ConduitUtil.getConduit(con.getBundle().getEntity().getWorldObj(), loc.x, loc.y, loc.z, con.getBaseConduitType());
    if(neighbour != null) {
      neighbour.conduitConnectionRemoved(connDir.getOpposite());
      if(neighbour.getNetwork() != null) {
        neighbour.getNetwork().destroyNetwork();
View Full Code Here

      con.getNetwork().destroyNetwork();
    }
  }

  public static <T extends IConduit> boolean joinConduits(T con, ForgeDirection faceHit) {
    BlockCoord loc = con.getLocation().getLocation(faceHit);
    IConduit neighbour = ConduitUtil.getConduit(con.getBundle().getEntity().getWorldObj(), loc.x, loc.y, loc.z, con.getBaseConduitType());
    if(neighbour != null && con.canConnectToConduit(faceHit, neighbour) && neighbour.canConnectToConduit(faceHit.getOpposite(), con)) {
      con.conduitConnectionAdded(faceHit);
      neighbour.conduitConnectionAdded(faceHit.getOpposite());
      if(con.getNetwork() != null) {
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.