Examples of moveForwards()


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

      {
        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

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

   
    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

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

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

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

    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

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

 
  @Override
  public boolean activateMachine()
  {   
    BlockPosition bp = BlockPosition.fromFactoryTile(this);
    bp.moveForwards(1);
    int blockId = worldObj.getBlockId(bp.x, bp.y, bp.z);
    int blockMeta = worldObj.getBlockMetadata(bp.x, bp.y, bp.z);
   
    Block b = Block.blocksList[blockId];
    if(b != null && !b.isAirBlock(worldObj, bp.x, bp.y, bp.z) && !Util.isBlockUnbreakable(worldObj, bp.x, bp.y, bp.z) && b.getBlockHardness(worldObj, bp.x, bp.y, bp.z) >= 0)
View Full Code Here

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

    for(ForgeDirection d : _attachDirections)
    {
      BlockPosition bp = new BlockPosition(x, y, z, d);
      for(int i = 0; i < _attachDistance; i++)
      {
        bp.moveForwards(1);
        if(world.getBlockId(bp.x, bp.y, bp.z) == blockID && world.isBlockSolidOnSide(bp.x, bp.y - 1, bp.z, ForgeDirection.UP))
        {
          return true;
        }
      }
View Full Code Here

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

    }
    for(ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = d;
      bp.moveForwards(1);
      world.notifyBlockOfNeighborChange(bp.x, bp.y, bp.z, MineFactoryReloadedCore.rednetCableBlock.blockID);
      world.notifyBlocksOfNeighborChange(bp.x, bp.y, bp.z, MineFactoryReloadedCore.rednetCableBlock.blockID);
    }
    super.breakBlock(world, x, y, z, id, meta);
  }
View Full Code Here

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

      {
        return 0;
      }
     
      BlockPosition nodebp = new BlockPosition(x, y, z, ForgeDirection.getOrientation(side).getOpposite());
      nodebp.moveForwards(1);

      int subnet = cable.getSideColor(nodebp.orientation);
     
      if(cable.getNetwork().isWeakNode(nodebp))
      {
View Full Code Here

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

 
  @Override
  public void onHitBlock(EntityPlayer owner, World world, int x, int y, int z, int side, double distance)
  {
    BlockPosition bp = new BlockPosition(x, y, z, ForgeDirection.getOrientation(side));
    bp.moveForwards(1);
    placeBlockAt(world, bp.x, bp.y, bp.z);
  }
 
  @Override
  public boolean onHitEntity(EntityPlayer owner, Entity hit, double distance)
View Full Code Here

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

      sides[4] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
      bp.moveLeft(1);
      sides[1] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
      bp.moveLeft(1);
      sides[5] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
      bp.moveForwards(1);
      sides[3] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
      bp.moveForwards(1);
      sides[6] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
      bp.moveRight(1);
      sides[2] = world.getBlockId(bp.x,bp.y,bp.z) == blockID;
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.