Package universalelectricity.api.vector

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


      {
        HashMap<Vector3, int[]> fieldBlocks = ((ItemModeCustom) projector.getMode()).getFieldBlockMap(projector, projector.getModeStack());
        Vector3 fieldCenter = new Vector3((TileEntity) projector).translate(projector.getTranslation());
        Vector3 relativePosition = position.clone().subtract(fieldCenter);
        relativePosition.rotate(-projector.getRotationYaw(), -projector.getRotationPitch());
        blockInfo = fieldBlocks.get(relativePosition.round());
      }

      // Search nearby inventories to extract blocks.
      for (int dir = 0; dir < 6; dir++)
      {
View Full Code Here


              if (fieldMap != null)
              {
                Vector3 fieldCenter = new Vector3((TileEntity) projector).translate(projector.getTranslation());
                Vector3 relativePosition = position.clone().subtract(fieldCenter);
                relativePosition.rotate(-projector.getRotationYaw(), -projector.getRotationPitch());
                int[] blockInfo = fieldMap.get(relativePosition.round());

                if (blockInfo != null && blockInfo[0] > 0)
                {
                  return new ItemStack(Block.blocksList[blockInfo[0]], 1, blockInfo[1]);
                }
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.