Package erogenousbeef.core.common

Examples of erogenousbeef.core.common.CoordTriplet


    float rawFuelUsage = (fuelPerRadiationUnit * rawRadIntensity / getFertilityModifier()) * BigReactors.fuelUsageMultiplier; // Not a typo. Fuel usage is thus penalized at high heats.
    data.fuelRfChange = rfPerRadiationUnit * effectiveRadIntensity;
    data.environmentRfChange = 0f;

    // Propagate radiation to others
    CoordTriplet originCoord = source.getWorldLocation();
    CoordTriplet currentCoord = new CoordTriplet(0, 0, 0);
   
    effectiveRadIntensity *= 0.25f; // We're going to do this four times, no need to repeat
    RadiationPacket radPacket = new RadiationPacket();

    for(ForgeDirection dir : StaticUtils.CardinalDirections) {
      radPacket.hardness = radHardness;
      radPacket.intensity = effectiveRadIntensity;
      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


  public CoordTriplet getReferenceCoord() {
    if(isConnected()) {
      return getMultiblockController().getReferenceCoord();
    }
    else {
      return new CoordTriplet(xCoord, yCoord, zCoord);
    }
  }
View Full Code Here

  }
 
  public static class Handler extends ReactorMessageServer.Handler<ReactorCommandEjectToPortMessage> {
    @Override
    public IMessage handleMessage(ReactorCommandEjectToPortMessage message, MessageContext ctx, MultiblockReactor reactor) {
      CoordTriplet dest = new CoordTriplet(message.portX, message.portY, message.portZ);
      if(message.ejectFuel) {
        reactor.ejectFuel(message.dumpExcess, dest);
      }
      else {
        reactor.ejectWaste(message.dumpExcess, dest);
View Full Code Here

  public CoordTriplet getReferenceCoord() {
    if(isConnected()) {
      return getMultiblockController().getReferenceCoord();
    }
    else {
      return new CoordTriplet(xCoord, yCoord, zCoord);
    }
  }
View Full Code Here

    case getFuelConsumedLastTick:
      return new Object[] { reactor.getFuelConsumedLastTick() };
     
    case getMinimumCoordinate:
    {
      CoordTriplet coord = reactor.getMinimumCoord();
      return new Object[] { coord.x, coord.y, coord.z };
    }
     
    case getMaximumCoordinate:
    {
      CoordTriplet coord = reactor.getMaximumCoord();
      return new Object[] { coord.x, coord.y, coord.z };
    }

    case setActive:
      if(arguments.length < 1) {
View Full Code Here

   
    if(index < 0 || index >= reactor.getFuelRodCount()) {
      throw new IndexOutOfBoundsException(String.format("Invalid argument %d, control rod index is out of bounds", index));
    }
   
    CoordTriplet coord = reactor.getControlRodLocations()[rodIndex];
   
    TileEntity te = worldObj.getTileEntity(coord.x, coord.y, coord.z);
    if(!(te instanceof TileEntityReactorControlRod)) {
      throw new Exception("Encountered an invalid tile entity when seeking a control rod. That's weird.");
    }
View Full Code Here

TOP

Related Classes of erogenousbeef.core.common.CoordTriplet

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.