Package erogenousbeef.core.common

Examples of erogenousbeef.core.common.CoordTriplet.translate()


        int bladeLength;
        ForgeDirection bladeDir;
        for(int bladeIdx = 0; bladeIdx < dirsToCheck.length; bladeIdx++) {
          bladeDir = dirsToCheck[bladeIdx];
          bladeCoord.copy(currentCoord);
          bladeCoord.translate(bladeDir);
          bladeLength = 0;
          while(worldObj.getBlock(bladeCoord.x, bladeCoord.y, bladeCoord.z) == BigReactors.blockTurbineRotorPart && bladeLength < 32) {
            bladeLength++;
            bladeCoord.translate(bladeDir);
          }
View Full Code Here


          bladeCoord.copy(currentCoord);
          bladeCoord.translate(bladeDir);
          bladeLength = 0;
          while(worldObj.getBlock(bladeCoord.x, bladeCoord.y, bladeCoord.z) == BigReactors.blockTurbineRotorPart && bladeLength < 32) {
            bladeLength++;
            bladeCoord.translate(bladeDir);
          }
         
          rotorInfo.bladeLengths[rotorPosition][bladeIdx] = bladeLength;
        }
       
View Full Code Here

      RotorSimpleRenderer.renderRotorShaft(BigReactors.blockTurbineRotorPart, renderBlocks, BlockTurbineRotorPart.METADATA_SHAFT, rotorDir, hasBlades, currentRotorCoord.x, currentRotorCoord.y, currentRotorCoord.z, false);
      for(int bladeIdx = 0; bladeIdx < bladeDirs.length; bladeIdx++) {
        bladeCoord.copy(currentRotorCoord);
        int bladeLen = 0;
        bladeCoord.translate(bladeDirs[bladeIdx]);
        while(bladeLen < rotorInfo.bladeLengths[rotorIdx][bladeIdx]) {
          RotorSimpleRenderer.renderBlade(renderBlocks, bladeCoord.x, bladeCoord.y, bladeCoord.z, BigReactors.blockTurbineRotorPart, BlockTurbineRotorPart.METADATA_BLADE, rotorInfo.rotorDirection);
          bladeLen++;
          bladeCoord.translate(bladeDirs[bladeIdx]);
        }
View Full Code Here

        int bladeLen = 0;
        bladeCoord.translate(bladeDirs[bladeIdx]);
        while(bladeLen < rotorInfo.bladeLengths[rotorIdx][bladeIdx]) {
          RotorSimpleRenderer.renderBlade(renderBlocks, bladeCoord.x, bladeCoord.y, bladeCoord.z, BigReactors.blockTurbineRotorPart, BlockTurbineRotorPart.METADATA_BLADE, rotorInfo.rotorDirection);
          bladeLen++;
          bladeCoord.translate(bladeDirs[bladeIdx]);
        }
      }
      rotorIdx++;
      currentRotorCoord.translate(rotorDir);
    }
View Full Code Here

      minRotorCoord.z = maxRotorCoord.z = rotorCoord.z;
    }

    // Figure out where the rotor ends and which directions are normal to the rotor's 4 faces (this is where blades emit from)
    CoordTriplet endRotorCoord = rotorCoord.equals(minRotorCoord) ? maxRotorCoord : minRotorCoord;
    endRotorCoord.translate(rotorDir.getOpposite());

    ForgeDirection[] bladeDirections;
    if(rotorDir.offsetY != 0) {
      bladeDirections = StaticUtils.CardinalDirections;
    }
View Full Code Here

      CoordTriplet checkCoord = rotorCoord.copy();
      boolean encounteredBlades = false;
      for(ForgeDirection bladeDir : bladeDirections) {
        checkCoord.copy(rotorCoord);
        boolean foundABlade = false;
        checkCoord.translate(bladeDir);
       
        // If we find 1 blade, we can keep moving along the normal to find more blades
        while(rotorBlades.remove(checkCoord)) {
          // We found a coil already?! NOT ALLOWED.
          if(encounteredCoils) {
View Full Code Here

          // We found a coil already?! NOT ALLOWED.
          if(encounteredCoils) {
            throw new MultiblockValidationException(String.format("%s - Rotor blades must be placed closer to the rotor bearing than all other parts inside a turbine", checkCoord));
          }
          foundABlade = encounteredBlades = true;
          checkCoord.translate(bladeDir);
        }

        // If this block wasn't a blade, check to see if it was a coil
        if(!foundABlade) {
          if(foundCoils.remove(checkCoord)) {
View Full Code Here

              throw new MultiblockValidationException(String.format("%s - Metal blocks must by placed further from the rotor bearing than all rotor blades", checkCoord));
            }
           
            // Check the two coil spots in the 'corners', which are permitted if they're connected to the main rotor coil somehow
            CoordTriplet coilCheck = checkCoord.copy();
            coilCheck.translate(bladeDir.getRotation(rotorDir));
            foundCoils.remove(coilCheck);
            coilCheck.copy(checkCoord);
            coilCheck.translate(bladeDir.getRotation(rotorDir.getOpposite()));
            foundCoils.remove(coilCheck);
          }
View Full Code Here

            // Check the two coil spots in the 'corners', which are permitted if they're connected to the main rotor coil somehow
            CoordTriplet coilCheck = checkCoord.copy();
            coilCheck.translate(bladeDir.getRotation(rotorDir));
            foundCoils.remove(coilCheck);
            coilCheck.copy(checkCoord);
            coilCheck.translate(bladeDir.getRotation(rotorDir.getOpposite()));
            foundCoils.remove(coilCheck);
          }
          // Else: It must have been air.
        }
      }
View Full Code Here

      int ttl = 4;
      currentCoord.copy(originCoord);

      while(ttl > 0 && radPacket.intensity > 0.0001f) {
        ttl--;
        currentCoord.translate(dir);
        performIrradiation(world, data, radPacket, currentCoord.x, currentCoord.y, currentCoord.z);
      }
    }

    // Apply changes
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.