Package powercrystals.core.position

Examples of powercrystals.core.position.Area


   
    if(_lastTree == null || _lastTree.x != x || _lastTree.y != y || _lastTree.z != z)
    {
      int yTreeAreaLowerBound = (treeFlipped ? y - MFRConfig.treeSearchMaxVertical.getInt() : y);
      int yTreeAreaUpperBound = (treeFlipped ? y : y + MFRConfig.treeSearchMaxVertical.getInt());
      Area a = new Area(x - MFRConfig.treeSearchMaxHorizontal.getInt(), x + MFRConfig.treeSearchMaxHorizontal.getInt(),
          yTreeAreaLowerBound, yTreeAreaUpperBound,
          z - MFRConfig.treeSearchMaxHorizontal.getInt(), z + MFRConfig.treeSearchMaxHorizontal.getInt());
     
      _treeManager = new TreeHarvestManager(a, treeFlipped ? TreeHarvestMode.HarvestInverted : TreeHarvestMode.Harvest);
      _lastTree = new BlockPosition(x, y, z);
View Full Code Here


   
    if(_lastTree == null || _lastTree.x != x || _lastTree.y != y || _lastTree.z != z)
    {
      int yTreeAreaLowerBound = (treeFlipped ? y - MFRConfig.fruitTreeSearchMaxVertical.getInt() : y);
      int yTreeAreaUpperBound = (treeFlipped ? y : y + MFRConfig.fruitTreeSearchMaxVertical.getInt());
      Area a = new Area(x - MFRConfig.fruitTreeSearchMaxHorizontal.getInt(), x + MFRConfig.fruitTreeSearchMaxHorizontal.getInt(),
          yTreeAreaLowerBound, yTreeAreaUpperBound,
          z - MFRConfig.fruitTreeSearchMaxHorizontal.getInt(), z + MFRConfig.fruitTreeSearchMaxHorizontal.getInt());
     
      _treeManager = new TreeHarvestManager(a, treeFlipped ? TreeHarvestMode.HarvestInverted : TreeHarvestMode.Harvest);
      _lastTree = new BlockPosition(x, y, z);
View Full Code Here

        setWorkDone(0);
      }
     
      if(_tick >= 23)
      {
        Area a = new Area(new BlockPosition(this), 3, 3, 3);
        List<?> entities = worldObj.getEntitiesWithinAABB(EntityLiving.class, a.toAxisAlignedBB());
        for(Object o : entities)
        {
          if(o instanceof EntityPlayer)
          {
            ((EntityPlayer)o).addPotionEffect(new PotionEffect(Potion.hunger.id, 20 * 20, 0));
View Full Code Here

   
    ourpos.x += _originOffsetX;
    ourpos.y += _originOffsetY;
    ourpos.z += _originOffsetZ;
   
    _harvestArea = new Area(ourpos, radius, _areaDown, _areaUp);
    _harvestedBlocks = _harvestArea.getPositionsBottomFirst();
    _currentBlock = 0;
  }
View Full Code Here

    }
    _tick++;
   
    if(_nextSewerCheckTick <= worldObj.getTotalWorldTime())
    {
      Area a = new Area(BlockPosition.fromFactoryTile(this), _areaManager.getRadius(), 0, 0);
      _jammed = false;
      for(BlockPosition bp : a.getPositionsBottomFirst())
      {
        if(worldObj.getBlockId(bp.x, bp.y, bp.z) == MineFactoryReloadedCore.machineBlocks.get(0).blockID &&
            worldObj.getBlockMetadata(bp.x, bp.y, bp.z) == Machine.Sewer.getMeta() &&
            !(bp.x == xCoord && bp.y == yCoord && bp.z == zCoord))
        {
View Full Code Here

  @Override
  public boolean activateMachine()
  {
    if(_isJammed || worldObj.getWorldTime() % 137 == 0)
    {
      Area fishingHole = _ham.getHarvestArea();
      for(BlockPosition bp: fishingHole.getPositionsBottomFirst())
      {
        if(worldObj.getBlockId(bp.x, bp.y, bp.z) != Block.waterStill.blockID)
        {
          _isJammed = true;
          setIdleTicks(getIdleTicksMax());
View Full Code Here

TOP

Related Classes of powercrystals.core.position.Area

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.