Package powercrystals.core.position

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


    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

    }
    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

      {
        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

 
  @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

      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

      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;
      bp.moveRight(1);
      sides[7] = 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.