Package powercrystals.core.position

Examples of powercrystals.core.position.BlockPosition.moveForwards()


    Map<ForgeDirection, IPipeEntry> pipes = new LinkedHashMap<ForgeDirection, IPipeEntry>();
    for(ForgeDirection direction : directionstocheck)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = direction;
      bp.moveForwards(1);
      TileEntity te = world.getBlockTileEntity(bp.x, bp.y, bp.z);
      if(te instanceof IPipeEntry)
      {
        pipes.put(direction, (IPipeEntry)te);
      }
View Full Code Here


    Map<ForgeDirection, IInventory> chests = new LinkedHashMap<ForgeDirection, IInventory>();
    for(ForgeDirection direction : directionstocheck)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = direction;
      bp.moveForwards(1);
      TileEntity te = world.getBlockTileEntity(bp.x, bp.y, bp.z);
      if(te instanceof IInventory)
      {
        chests.put(direction, checkForDoubleChest(world, te, bp));
      }
View Full Code Here

    {
      if(!Arrays.areEqual(lastOuput[i], _buffers[i + 6]))
      {
        BlockPosition bp = new BlockPosition(this);
        bp.orientation = ForgeDirection.VALID_DIRECTIONS[i];
        bp.moveForwards(1);
        Block b = Block.blocksList[worldObj.getBlockId(bp.x, bp.y, bp.z)];
        if(b instanceof IRedNetNetworkContainer)
        {
          ((IRedNetNetworkContainer)b).updateNetwork(worldObj, bp.x, bp.y, bp.z);
        }
View Full Code Here

 
  public RedNetConnectionType getConnectionState(ForgeDirection side)
  {
    BlockPosition bp = new BlockPosition(this);
    bp.orientation = side;
    bp.moveForwards(1);
   
    int blockId = worldObj.getBlockId(bp.x, bp.y, bp.z);
    Block b = Block.blocksList[blockId];
   
    if(b == null) // block doesn't exist (air) - never connect
View Full Code Here

 
  private TileEntityLaserDrill getDrill()
  {
    BlockPosition bp = new BlockPosition(this);
    bp.orientation = getDirectionFacing();
    bp.moveForwards(1);
   
    if(!worldObj.isAirBlock(bp.x, bp.y, bp.z))
    {
      return null;
    }
View Full Code Here

    if(!worldObj.isAirBlock(bp.x, bp.y, bp.z))
    {
      return null;
    }
   
    bp.moveForwards(1);
   
    TileEntity te = worldObj.getBlockTileEntity(bp.x, bp.y, bp.z);
    if(te instanceof TileEntityLaserDrill)
    {
      return ((TileEntityLaserDrill)te);
View Full Code Here

      {
        continue;
      }
     
      BlockPosition bp = BlockPosition.fromFactoryTile(this);
      bp.moveForwards(1);
      if(worldObj.isAirBlock(bp.x, bp.y, bp.z))
      {
        worldObj.setBlock(bp.x, bp.y, bp.z, _inventory[i].itemID, _inventory[i].getItemDamage(), 3);
        Block block = Block.blocksList[_inventory[i].itemID];
        worldObj.playSoundEffect(bp.x + 0.5, bp.y + 0.5, bp.z + 0.5,
View Full Code Here

   
    int radius = _radius + _upgradeLevel;
   
    if(ourpos.orientation == ForgeDirection.UP || ourpos.orientation == ForgeDirection.DOWN)
    {
      ourpos.moveForwards(1);
    }
    else
    {
      ourpos.moveForwards(radius + 1);
    }
View Full Code Here

    {
      ourpos.moveForwards(1);
    }
    else
    {
      ourpos.moveForwards(radius + 1);
    }
   
    ourpos.x += _originOffsetX;
    ourpos.y += _originOffsetY;
    ourpos.z += _originOffsetZ;
View Full Code Here

    ArrayList<ForgeDirection> nonConveyors = new ArrayList<ForgeDirection>();
    for(ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = direction;
      bp.moveForwards(1);
      TileEntity te = world.getBlockTileEntity(bp.x, bp.y, bp.z);
      if(te == null || !(te instanceof TileEntityConveyor))
      {
        nonConveyors.add(direction);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.