Examples of BlockPosition


Examples of powercrystals.core.position.BlockPosition

  }
 
  @Override
  public boolean activateMachine()
  {
    BlockPosition bp = _areaManager.getNextBlock();
   
    int targetId = worldObj.getBlockId(bp.x, bp.y, bp.z);
    if(!MFRRegistry.getFertilizables().containsKey(new Integer(targetId)))
    {
      setIdleTicks(getIdleTicksMax());
View Full Code Here

Examples of powercrystals.core.position.BlockPosition

    {
      NBTTagCompound tag = new NBTTagCompound();
      NBTTagCompound name = new NBTTagCompound();
      name.setString("Name", getInvName());
      tag.setTag("display", name);
      BlockNBTManager.setForBlock(new BlockPosition(xCoord, yCoord, zCoord), tag);
    }
  }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition

  public static ForgeDirection[] directionsWithoutConveyors(World world, int x, int y, int z)
  {
    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

  }
 
  @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

  {
    if(tank != null && tank.getLiquid() != null && tank.getLiquid().amount > 0)
    {
      LiquidStack l = tank.getLiquid().copy();
      l.amount = Math.min(l.amount, LiquidContainerRegistry.BUCKET_VOLUME);
      for(BlockPosition adj : new BlockPosition(from).getAdjacent(true))
      {
        TileEntity tile = from.worldObj.getBlockTileEntity(adj.x, adj.y, adj.z);
        if(tile instanceof ITankContainer)
        {
          int filled = ((ITankContainer)tile).fill(adj.orientation.getOpposite(), l, true);
View Full Code Here

Examples of powercrystals.core.position.BlockPosition

      {
        continue;
      }
     
      ItemStack stackToAdd = contents.getValue().copy();
      ItemStack remaining = UtilInventory.dropStack(world, new BlockPosition(x, y, z), contents.getValue(), ForgeDirection.VALID_DIRECTIONS, ForgeDirection.UNKNOWN);
     
      if(remaining != null)
      {
        stackToAdd.stackSize -= remaining.stackSize;
      }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition

    {
      return true;
    }
    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

    {
      ((TileEntityRedNetCable)te).getNetwork().setInvalid();
    }
    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

      if(cable.getNetwork() == null || cable.getConnectionState(ForgeDirection.VALID_DIRECTIONS[side].getOpposite()) == RedNetConnectionType.None)
      {
        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

  }
 
  @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);
  }
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.