Package universalelectricity.api.vector

Examples of universalelectricity.api.vector.Vector3.intX()


    Vector3 negativeScale = new Vector3(this).translate(this.getTranslation()).subtract(this.getNegativeScale());

    Vector3 minScale = positiveScale.min(negativeScale);
    Vector3 maxScale = positiveScale.max(negativeScale);

    return AxisAlignedBB.getAABBPool().getAABB(minScale.intX(), minScale.intY(), minScale.intZ(), maxScale.intX(), maxScale.intY(), maxScale.intZ());
  }

  /**
   * Gets the position in which the manipulator will try to translate the field into.
   *
 
View Full Code Here


            /**
             * Prevents the force field projector from disintegrating itself.
             */
            if (block != ModularForceFieldSystem.blockForceField && !vector.equals(new Vector3(this)))
            {
              if (this.worldObj.getChunkFromBlockCoords(vector.intX(), vector.intZ()).isChunkLoaded)
              {
                constructionCount++;

                for (IModule module : getModules(getModuleSlots()))
                {
View Full Code Here

                  }
                }

                if (!this.worldObj.isRemote)
                {
                  this.worldObj.setBlock(vector.intX(), vector.intY(), vector.intZ(), ModularForceFieldSystem.blockForceField.blockID, 0, 2);
                }

                this.forceFields.add(vector);

                  /*
 
View Full Code Here

                  /*
                   * Sets the controlling projector of the force field block to
                   * this one.
                   */
                TileEntity tileEntity = this.worldObj.getBlockTileEntity(vector.intX(), vector.intY(), vector.intZ());

                if (tileEntity instanceof TileForceField)
                {
                  ((TileForceField) tileEntity).setProjector(new Vector3(this));
                }
View Full Code Here

          Vector3 vector = it.next();
          Block block = Block.blocksList[vector.getBlockID(this.worldObj)];

          if (block == ModularForceFieldSystem.blockForceField)
          {
            this.worldObj.setBlock(vector.intX(), vector.intY(), vector.intZ(), 0, 0, 3);
          }
        }
      }
    }
View Full Code Here

    final Set<Vector3> fieldBlocks = new HashSet<Vector3>();

    final Vector3 posScale = projector.getPositiveScale();
    final Vector3 negScale = projector.getNegativeScale();

    int radius = (posScale.intX() + negScale.intX() + posScale.intZ() + negScale.intZ()) / 2;
    int height = posScale.intY() + negScale.intY();

    for (float x = -radius; x <= radius; x += 1)
    {
      for (float z = -radius; z <= radius; z += 1)
View Full Code Here

    final Vector3 translation = projector.getTranslation();

    final Vector3 posScale = projector.getPositiveScale();
    final Vector3 negScale = projector.getNegativeScale();

    int radius = (posScale.intX() + negScale.intX() + posScale.intZ() + negScale.intZ()) / 2;
    int height = posScale.intY() + negScale.intY();

    for (int x = -radius; x <= radius; x++)
    {
      for (int z = -radius; z <= radius; z++)
View Full Code Here

  public boolean isInField(IFieldInteraction projector, Vector3 position)
  {
    Vector3 posScale = projector.getPositiveScale();
    Vector3 negScale = projector.getNegativeScale();

    int radius = (posScale.intX() + negScale.intX() + posScale.intZ() + negScale.intZ()) / 2;

    Vector3 projectorPos = new Vector3((TileEntity) projector);
    projectorPos.add(projector.getTranslation());

    Vector3 relativePosition = position.clone().subtract(projectorPos);
View Full Code Here

      {
        int blockId = position.getBlockID(world);

        if (Block.blocksList[blockId] != null)
        {
          Chunk chunk = world.getChunkFromBlockCoords(position.intX(), position.intZ());

          if (chunk != null && chunk.isChunkLoaded && (MFFSHelper.hasPermission(world, position, Action.RIGHT_CLICK_BLOCK, entityPlayer) || MFFSHelper.hasPermission(world, position, Permission.REMOTE_CONTROL, entityPlayer)))
          {
            float requiredEnergy = (float) Vector3.distance(new Vector3(entityPlayer), position) * (FluidContainerRegistry.BUCKET_VOLUME / 100);
            int receivedEnergy = 0;
View Full Code Here

              if (receivedEnergy >= requiredEnergy)
              {
                try
                {
                  Block.blocksList[blockId].onBlockActivated(world, position.intX(), position.intY(), position.intZ(), entityPlayer, 0, 0, 0, 0);
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
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.