aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/Ic2ExpReactorPlanner
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-28 19:32:44 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-28 19:32:44 -0800
commit55f64675b42ac8d3c557cc850f78664bee006f6f (patch)
tree2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/Ic2ExpReactorPlanner
parent0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff)
downloadGT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz
GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2
GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/Ic2ExpReactorPlanner')
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java148
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/BigintStorage.java18
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/ComponentFactory.java101
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/Reactor.java72
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/SimulationData.java6
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java2
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Condensator.java15
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/CoolantCell.java15
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Exchanger.java20
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/FuelRod.java23
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Plating.java21
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java134
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Reflector.java15
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Vent.java21
14 files changed, 263 insertions, 348 deletions
diff --git a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
index e83e46ce59..45c1f5bdf5 100644
--- a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
+++ b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
@@ -1,12 +1,13 @@
package Ic2ExpReactorPlanner;
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
import Ic2ExpReactorPlanner.components.ReactorItem;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.misc.GT_TileEntity_ComputerCube;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
/**
*
@@ -85,8 +86,8 @@ public class AutomationSimulator {
return null;
}
- public AutomationSimulator(
- final Reactor reactor, final ArrayList<String> output2, final GT_TileEntity_ComputerCube aTile) {
+ public AutomationSimulator(final Reactor reactor, final ArrayList<String> output2,
+ final GT_TileEntity_ComputerCube aTile) {
this.reactor = reactor;
this.output = output2;
this.mReactor = aTile;
@@ -208,9 +209,8 @@ public class AutomationSimulator {
if (active) {
activeTime++;
currentActiveTime++;
- if (reactor.isPulsed()
- && (reactor.getCurrentHeat() >= suspendTemp
- || (reactorTicks % clockPeriod) >= onPulseDuration)) {
+ if (reactor.isPulsed() && (reactor.getCurrentHeat() >= suspendTemp
+ || (reactorTicks % clockPeriod) >= onPulseDuration)) {
active = false;
minActiveTime = Math.min(currentActiveTime, minActiveTime);
maxActiveTime = Math.max(currentActiveTime, maxActiveTime);
@@ -221,14 +221,13 @@ public class AutomationSimulator {
currentInactiveTime++;
if (reactor.isAutomated() && pauseTimer > 0) {
pauseTimer--;
- } else if ((reactor.isPulsed()
- && reactor.getCurrentHeat() <= resumeTemp
+ } else if ((reactor.isPulsed() && reactor.getCurrentHeat() <= resumeTemp
&& (reactorTicks % clockPeriod) < onPulseDuration)) {
- active = true;
- minInactiveTime = Math.min(currentInactiveTime, minInactiveTime);
- maxInactiveTime = Math.max(currentInactiveTime, maxInactiveTime);
- currentInactiveTime = 0;
- }
+ active = true;
+ minInactiveTime = Math.min(currentInactiveTime, minInactiveTime);
+ maxInactiveTime = Math.max(currentInactiveTime, maxInactiveTime);
+ currentInactiveTime = 0;
+ }
}
}
minEUoutput = Math.min(lastEUoutput, minEUoutput);
@@ -405,8 +404,10 @@ public class AutomationSimulator {
ReactorItem component = reactor.getComponentAt(row, col);
if (component != null) {
if (component.getVentCoolingCapacity() > 0) {
- component.info.append("ComponentInfo.UsedCooling " + component.getBestVentCooling() + " | "
- + component.getVentCoolingCapacity());
+ component.info.append(
+ "ComponentInfo.UsedCooling " + component.getBestVentCooling()
+ + " | "
+ + component.getVentCoolingCapacity());
totalEffectiveVentCooling += component.getBestVentCooling();
totalVentCoolingCapacity += component.getVentCoolingCapacity();
} else if (component.getBestCellCooling() > 0) {
@@ -417,15 +418,21 @@ public class AutomationSimulator {
totalCondensatorCooling += component.getBestCondensatorCooling();
} else if (component.getMaxHeatGenerated() > 0) {
if (!reactor.isFluid() && component.getMaxEUGenerated() > 0) {
- component.info.append("ComponentInfo.GeneratedEU " + component.getMinEUGenerated() + " | "
- + component.getMaxEUGenerated());
+ component.info.append(
+ "ComponentInfo.GeneratedEU " + component.getMinEUGenerated()
+ + " | "
+ + component.getMaxEUGenerated());
}
- component.info.append("ComponentInfo.GeneratedHeat " + component.getMinHeatGenerated() + " | "
- + component.getMaxHeatGenerated());
+ component.info.append(
+ "ComponentInfo.GeneratedHeat " + component.getMinHeatGenerated()
+ + " | "
+ + component.getMaxHeatGenerated());
}
if (component.getMaxReachedHeat() > 0) {
- component.info.append("ComponentInfo.ReachedHeat " + component.getMaxReachedHeat() + " | "
- + component.getMaxHeat());
+ component.info.append(
+ "ComponentInfo.ReachedHeat " + component.getMaxReachedHeat()
+ + " | "
+ + component.getMaxHeat());
}
}
}
@@ -464,15 +471,11 @@ public class AutomationSimulator {
// }
// return null;
- /* catch (Throwable e) {
- if (cooldownTicks == 0) {
- publish("Simulation.ErrorReactor", reactorTicks);
- } else {
- publish("Simulation.ErrorCooldown", cooldownTicks);
- }
- publish(e.toString(), " ", Arrays.toString(e.getStackTrace()); // NO18N
-
- }*/
+ /*
+ * catch (Throwable e) { if (cooldownTicks == 0) { publish("Simulation.ErrorReactor", reactorTicks); } else {
+ * publish("Simulation.ErrorCooldown", cooldownTicks); } publish(e.toString(), " ",
+ * Arrays.toString(e.getStackTrace()); // NO18N }
+ */
data.explosionPower = (int) explosionPower;
data.totalReactorTicks = reactorTicks;
long endTime = System.nanoTime();
@@ -508,29 +511,28 @@ public class AutomationSimulator {
}
} else if (component.getAutomationThreshold() < component.getInitialHeat()
&& component.getCurrentHeat() <= component.getAutomationThreshold()) {
- component.clearCurrentHeat();
- component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks);
- if (component.getReactorPause() > 0) {
- active = false;
- pauseTimer = Math.max(pauseTimer, component.getReactorPause());
- minActiveTime = Math.min(currentActiveTime, minActiveTime);
- maxActiveTime = Math.max(currentActiveTime, maxActiveTime);
- currentActiveTime = 0;
+ component.clearCurrentHeat();
+ component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks);
+ if (component.getReactorPause() > 0) {
+ active = false;
+ pauseTimer = Math.max(pauseTimer, component.getReactorPause());
+ minActiveTime = Math.min(currentActiveTime, minActiveTime);
+ maxActiveTime = Math.max(currentActiveTime, maxActiveTime);
+ currentActiveTime = 0;
+ }
+ }
+ } else if (component.isBroken() || (component.getMaxDamage() > 1
+ && component.getCurrentDamage() >= component.getAutomationThreshold())) {
+ component.clearDamage();
+ component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks);
+ if (component.getReactorPause() > 0) {
+ active = false;
+ pauseTimer = Math.max(pauseTimer, component.getReactorPause());
+ minActiveTime = Math.min(currentActiveTime, minActiveTime);
+ maxActiveTime = Math.max(currentActiveTime, maxActiveTime);
+ currentActiveTime = 0;
+ }
}
- }
- } else if (component.isBroken()
- || (component.getMaxDamage() > 1
- && component.getCurrentDamage() >= component.getAutomationThreshold())) {
- component.clearDamage();
- component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks);
- if (component.getReactorPause() > 0) {
- active = false;
- pauseTimer = Math.max(pauseTimer, component.getReactorPause());
- minActiveTime = Math.min(currentActiveTime, minActiveTime);
- maxActiveTime = Math.max(currentActiveTime, maxActiveTime);
- currentActiveTime = 0;
- }
- }
}
if (reactor.isUsingReactorCoolantInjectors() && component != null && component.needsCoolantInjected()) {
component.injectCoolant();
@@ -668,34 +670,16 @@ public class AutomationSimulator {
protected void process(List<String> chunks) {
/*
- for (String chunk : chunks) {
- if (chunk.isEmpty()) {
- output.add(""); // NO18N
- }
- else {
- if (chunk.matches("R\\dC\\d:.*")) { // NO18N
- String temp = chunk.substring(5);
- int row = chunk.charAt(1) - '0';
- int col = chunk.charAt(3) - '0';
- if (temp.startsWith("0x")) { // NO18N
- mReactorComponents[row][col].setBackground(Color.decode(temp));
- if ("0xC0C0C0".equals(temp)) {
- mReactorComponents[row][col].setToolTipText(null);
- }
- else if ("0xFF0000".equals(temp)) {
- mReactorComponents[row][col].setToolTipText(getI18n("ComponentTooltip.Broken"));
- }
- else if ("0xFFA500".equals(temp)) {
- mReactorComponents[row][col].setToolTipText(getI18n("ComponentTooltip.ResidualHeat"));
- }
- }
- }
- else {
- output.add(chunk);
- }
- }
- }
- */
+ * for (String chunk : chunks) { if (chunk.isEmpty()) { output.add(""); // NO18N } else { if
+ * (chunk.matches("R\\dC\\d:.*")) { // NO18N String temp = chunk.substring(5); int row = chunk.charAt(1) - '0';
+ * int col = chunk.charAt(3) - '0'; if (temp.startsWith("0x")) { // NO18N
+ * mReactorComponents[row][col].setBackground(Color.decode(temp)); if ("0xC0C0C0".equals(temp)) {
+ * mReactorComponents[row][col].setToolTipText(null); } else if ("0xFF0000".equals(temp)) {
+ * mReactorComponents[row][col].setToolTipText(getI18n("ComponentTooltip.Broken")); } else if
+ * ("0xFFA500".equals(temp)) {
+ * mReactorComponents[row][col].setToolTipText(getI18n("ComponentTooltip.ResidualHeat")); } } } else {
+ * output.add(chunk); } } }
+ */
}
public void cancel() {
diff --git a/src/main/java/Ic2ExpReactorPlanner/BigintStorage.java b/src/main/java/Ic2ExpReactorPlanner/BigintStorage.java
index b9ca1760c6..d9d4d62c3c 100644
--- a/src/main/java/Ic2ExpReactorPlanner/BigintStorage.java
+++ b/src/main/java/Ic2ExpReactorPlanner/BigintStorage.java
@@ -4,20 +4,21 @@ import java.math.BigInteger;
import java.util.Base64;
/**
- * Stores numbers of varying size inside a BigInteger, expecting each to have
- * a defined limit (which need not be an exact power of 2). Numbers are to be
- * extracted in reverse order they were stored, and special values can be used
- * to make certain values optional for inclusion (the calling class is
- * responsible for handling this logic, though).
+ * Stores numbers of varying size inside a BigInteger, expecting each to have a defined limit (which need not be an
+ * exact power of 2). Numbers are to be extracted in reverse order they were stored, and special values can be used to
+ * make certain values optional for inclusion (the calling class is responsible for handling this logic, though).
+ *
* @author Brian McCloud
*/
public class BigintStorage {
+
private BigInteger storedValue = BigInteger.ZERO;
/**
- * Stores the specified value. Requires that 0 &lt;= value &lt;= max.
+ * Stores the specified value. Requires that 0 &lt;= value &lt;= max.
+ *
* @param value the value to store.
- * @param max the expected maximum for the value.
+ * @param max the expected maximum for the value.
*/
public void store(int value, int max) {
if (value < 0 || value > max) {
@@ -28,6 +29,7 @@ public class BigintStorage {
/**
* Extracts a value based on the specified maximum.
+ *
* @param max the expected maximum for the value.
* @return the extracted value.
*/
@@ -39,6 +41,7 @@ public class BigintStorage {
/**
* Takes input of a Base64 string, and converts it to a BigintStorage.
+ *
* @param code the Base64-encoded string (presumed to be from @outputBase64)
* @return the converted storage object.
*/
@@ -51,6 +54,7 @@ public class BigintStorage {
/**
* Outputs the current value of this BigintStorage as a Base64-encoded string.
+ *
* @return the Base64-encoded string.
*/
public String outputBase64() {
diff --git a/src/main/java/Ic2ExpReactorPlanner/ComponentFactory.java b/src/main/java/Ic2ExpReactorPlanner/ComponentFactory.java
index 865c3d7c41..6b35efd47b 100644
--- a/src/main/java/Ic2ExpReactorPlanner/ComponentFactory.java
+++ b/src/main/java/Ic2ExpReactorPlanner/ComponentFactory.java
@@ -1,10 +1,14 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
import Ic2ExpReactorPlanner.components.Condensator;
import Ic2ExpReactorPlanner.components.CoolantCell;
import Ic2ExpReactorPlanner.components.Exchanger;
@@ -22,21 +26,18 @@ import gtPlusPlus.xmod.bartworks.BW_Utils;
import gtPlusPlus.xmod.bartworks.BW_Utils.NonMeta_MaterialItem;
import gtPlusPlus.xmod.goodgenerator.GG_Utils;
import gtPlusPlus.xmod.goodgenerator.GG_Utils.GG_Fuel_Rod;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
/**
* Factory class to handle creating components by id or name.
+ *
* @author Brian McCloud
*/
public class ComponentFactory {
public static int MAX_COMPONENT_ID = 64;
- static ItemList[] aGtItems =
- new ItemList[] {ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2, ItemList.Moxcell_4};
+ static ItemList[] aGtItems = new ItemList[] { ItemList.Neutron_Reflector, ItemList.Moxcell_1, ItemList.Moxcell_2,
+ ItemList.Moxcell_4 };
private ComponentFactory() {
// do nothing, this class should not be instantiated.
@@ -52,8 +53,7 @@ public class ComponentFactory {
new FuelRod(
1,
"fuelRodUranium",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumSimple", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumSimple", 1).copy()),
20e3,
1,
null,
@@ -66,8 +66,7 @@ public class ComponentFactory {
new FuelRod(
2,
"dualFuelRodUranium",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumDual", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumDual", 1).copy()),
20e3,
1,
null,
@@ -80,8 +79,7 @@ public class ComponentFactory {
new FuelRod(
3,
"quadFuelRodUranium",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumQuad", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorUraniumQuad", 1).copy()),
20e3,
1,
null,
@@ -92,7 +90,16 @@ public class ComponentFactory {
ITEM_LIST.put(
aID++,
new FuelRod(
- 4, "fuelRodMox", new GT_ItemStack(aGtItems[1].get(1).copy()), 10e3, 1, null, 100, 2, 1, true));
+ 4,
+ "fuelRodMox",
+ new GT_ItemStack(aGtItems[1].get(1).copy()),
+ 10e3,
+ 1,
+ null,
+ 100,
+ 2,
+ 1,
+ true));
ITEM_LIST.put(
aID++,
new FuelRod(
@@ -124,8 +131,7 @@ public class ComponentFactory {
new Reflector(
7,
"neutronReflector",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorReflector", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorReflector", 1).copy()),
30e3,
1,
null));
@@ -134,8 +140,7 @@ public class ComponentFactory {
new Reflector(
8,
"thickNeutronReflector",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorReflectorThick", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorReflectorThick", 1).copy()),
120e3,
1,
null));
@@ -144,8 +149,7 @@ public class ComponentFactory {
new Vent(
9,
"heatVent",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorVent", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVent", 1).copy()),
1,
1000,
null,
@@ -157,8 +161,7 @@ public class ComponentFactory {
new Vent(
10,
"advancedHeatVent",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentDiamond", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentDiamond", 1).copy()),
1,
1000,
null,
@@ -170,8 +173,7 @@ public class ComponentFactory {
new Vent(
11,
"reactorHeatVent",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorVentCore", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentCore", 1).copy()),
1,
1000,
null,
@@ -183,8 +185,7 @@ public class ComponentFactory {
new Vent(
12,
"componentHeatVent",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorVentSpread", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentSpread", 1).copy()),
1,
1,
null,
@@ -196,8 +197,7 @@ public class ComponentFactory {
new Vent(
13,
"overclockedHeatVent",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorVentGold", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorVentGold", 1).copy()),
1,
1000,
null,
@@ -209,8 +209,7 @@ public class ComponentFactory {
new CoolantCell(
14,
"coolantCell10k",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1).copy()),
1,
10e3,
null));
@@ -219,8 +218,7 @@ public class ComponentFactory {
new CoolantCell(
15,
"coolantCell30k",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1).copy()),
1,
30e3,
null));
@@ -229,8 +227,7 @@ public class ComponentFactory {
new CoolantCell(
16,
"coolantCell60k",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorCoolantSix", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCoolantSix", 1).copy()),
1,
60e3,
null));
@@ -239,8 +236,7 @@ public class ComponentFactory {
new Exchanger(
17,
"heatExchanger",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorHeatSwitch", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitch", 1).copy()),
1,
2500,
null,
@@ -251,8 +247,7 @@ public class ComponentFactory {
new Exchanger(
18,
"advancedHeatExchanger",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchDiamond", 1).copy()),
1,
10e3,
null,
@@ -263,8 +258,7 @@ public class ComponentFactory {
new Exchanger(
19,
"coreHeatExchanger",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchCore", 1).copy()),
1,
5000,
null,
@@ -275,8 +269,7 @@ public class ComponentFactory {
new Exchanger(
20,
"componentHeatExchanger",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorHeatSwitchSpread", 1).copy()),
1,
5000,
null,
@@ -287,8 +280,7 @@ public class ComponentFactory {
new Plating(
21,
"reactorPlating",
- new GT_ItemStack(
- GT_ModHandler.getIC2Item("reactorPlating", 1).copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorPlating", 1).copy()),
1,
1,
null,
@@ -299,8 +291,7 @@ public class ComponentFactory {
new Plating(
22,
"heatCapacityReactorPlating",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorPlatingHeat", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorPlatingHeat", 1).copy()),
1,
1,
null,
@@ -311,8 +302,7 @@ public class ComponentFactory {
new Plating(
23,
"containmentReactorPlating",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1).copy()),
1,
1,
null,
@@ -323,8 +313,7 @@ public class ComponentFactory {
new Condensator(
24,
"rshCondensator",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCondensator", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCondensator", 1).copy()),
1,
20e3,
null));
@@ -333,8 +322,7 @@ public class ComponentFactory {
new Condensator(
25,
"lzhCondensator",
- new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCondensatorLap", 1)
- .copy()),
+ new GT_ItemStack(GT_ModHandler.getIC2Item("reactorCondensatorLap", 1).copy()),
1,
100e3,
null));
@@ -784,6 +772,7 @@ public class ComponentFactory {
/**
* Gets a default instances of the specified component (such as for drawing button images)
+ *
* @param id the id of the component.
* @return the component with the specified id, or null if the id is out of range.
*/
@@ -798,6 +787,7 @@ public class ComponentFactory {
/**
* Gets a default instances of the specified component (such as for drawing button images)
+ *
* @param name the name of the component.
* @return the component with the specified name, or null if the name is not found.
*/
@@ -810,6 +800,7 @@ public class ComponentFactory {
/**
* Creates a new instance of the specified component.
+ *
* @param id the id of the component to create.
* @return a new instance of the specified component, or null if the id is out of range.
*/
@@ -824,6 +815,7 @@ public class ComponentFactory {
/**
* Creates a new instance of the specified component.
+ *
* @param name the name of the component to create.
* @return a new instance of the specified component, or null if the name is not found.
*/
@@ -836,6 +828,7 @@ public class ComponentFactory {
/**
* Get the number of defined components.
+ *
* @return the number of defined components.
*/
public static int getComponentCount() {
diff --git a/src/main/java/Ic2ExpReactorPlanner/Reactor.java b/src/main/java/Ic2ExpReactorPlanner/Reactor.java
index 6dfc379b8d..cbfd549552 100644
--- a/src/main/java/Ic2ExpReactorPlanner/Reactor.java
+++ b/src/main/java/Ic2ExpReactorPlanner/Reactor.java
@@ -1,16 +1,17 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner;
-import Ic2ExpReactorPlanner.components.ReactorItem;
import java.awt.HeadlessException;
import java.util.ArrayList;
+import Ic2ExpReactorPlanner.components.ReactorItem;
+
/**
* Represents an IndustrialCraft2 Nuclear Reactor.
+ *
* @author Brian McCloud
*/
public class Reactor {
@@ -106,6 +107,7 @@ public class Reactor {
/**
* Adjust the maximum heat
+ *
* @param adjustment the adjustment amount (negative values decrease the max heat).
*/
public void adjustMaxHeat(final double adjustment) {
@@ -113,7 +115,9 @@ public class Reactor {
}
/**
- * Set the current heat of the reactor. Mainly to be used for simulating a pre-heated reactor, or for resetting to 0 for a new simulation.
+ * Set the current heat of the reactor. Mainly to be used for simulating a pre-heated reactor, or for resetting to 0
+ * for a new simulation.
+ *
* @param currentHeat the heat to set
*/
public void setCurrentHeat(final double currentHeat) {
@@ -122,6 +126,7 @@ public class Reactor {
/**
* Adjusts the reactor's current heat by a specified amount
+ *
* @param adjustment the adjustment amount.
*/
public void adjustCurrentHeat(final double adjustment) {
@@ -133,6 +138,7 @@ public class Reactor {
/**
* add some EU output.
+ *
* @param amount the amount of EU to output over 1 reactor tick (20 game ticks).
*/
public void addEUOutput(final double amount) {
@@ -148,6 +154,7 @@ public class Reactor {
/**
* Gets a list of the materials needed to build the components.
+ *
* @return a list of the materials needed to build the components.
*/
public ArrayList getMaterials() {
@@ -174,7 +181,9 @@ public class Reactor {
}
/**
- * Adds to the amount of heat vented this reactor tick, in case it is a new-style reactor with a pressure vessel and outputting heat to fluid instead of EU.
+ * Adds to the amount of heat vented this reactor tick, in case it is a new-style reactor with a pressure vessel and
+ * outputting heat to fluid instead of EU.
+ *
* @param amount the amount to add.
*/
public void ventHeat(final double amount) {
@@ -190,14 +199,18 @@ public class Reactor {
/**
* Get a code that represents the component set, which can be passed between forum users, etc.
- * @return a code representing some ids for the components and arrangement. Passing the same code to setCode() should re-create an identical reactor setup, even if other changes have happened in the meantime.
+ *
+ * @return a code representing some ids for the components and arrangement. Passing the same code to setCode()
+ * should re-create an identical reactor setup, even if other changes have happened in the meantime.
*/
public String getCode() {
return "erp=" + buildCodeString();
}
/**
- * Sets a code to configure the entire grid all at once. Expects the code to have originally been output by getCode().
+ * Sets a code to configure the entire grid all at once. Expects the code to have originally been output by
+ * getCode().
+ *
* @param code the code of the reactor setup to use.
*/
public void setCode(final String code) {
@@ -329,8 +342,7 @@ public class Reactor {
} else {
String tempCode = code;
if (code.startsWith("http://www.talonfiremage.pwp.blueyonder.co.uk/v3/reactorplanner.html?")) { // NOI18N
- tempCode = code.replace(
- "http://www.talonfiremage.pwp.blueyonder.co.uk/v3/reactorplanner.html?", ""); // NOI18N
+ tempCode = code.replace("http://www.talonfiremage.pwp.blueyonder.co.uk/v3/reactorplanner.html?", ""); // NOI18N
}
if (tempCode.matches("[0-9a-z]+")) { // NOI18N
// Possibly a code from Talonius's old planner
@@ -569,7 +581,7 @@ public class Reactor {
if (component != null) {
int id = component.id;
// only store automation details for a component if non-default, and add a flag bit to indicate
- // their presence. null components don't even need the flag bit.
+ // their presence. null components don't even need the flag bit.
if (component.getInitialHeat() > 0
|| component.getAutomationThreshold()
!= ComponentFactory.getDefaultComponent(id).getAutomationThreshold()
@@ -605,32 +617,22 @@ public class Reactor {
final ReactorItem component = getComponentAt(row, col);
final int id = (component != null) ? component.id : 0;
result.append(String.format("%02X", id)); // NOI18N
- if (component != null
- && (component.getInitialHeat() > 0
- || (automated
- && component.getAutomationThreshold()
- != ComponentFactory.getDefaultComponent(id)
- .getAutomationThreshold())
- || (automated
- && component.getReactorPause()
- != ComponentFactory.getDefaultComponent(id)
- .getReactorPause()))) {
+ if (component != null && (component.getInitialHeat() > 0
+ || (automated && component.getAutomationThreshold()
+ != ComponentFactory.getDefaultComponent(id).getAutomationThreshold())
+ || (automated && component.getReactorPause()
+ != ComponentFactory.getDefaultComponent(id).getReactorPause()))) {
result.append("(");
if (component.getInitialHeat() > 0) {
- result.append(String.format(
- "h%s,", Integer.toString((int) component.getInitialHeat(), 36))); // NOI18N
+ result.append(String.format("h%s,", Integer.toString((int) component.getInitialHeat(), 36))); // NOI18N
}
- if (automated
- && component.getAutomationThreshold()
- != ComponentFactory.getDefaultComponent(id).getAutomationThreshold()) {
- result.append(String.format(
- "a%s,", Integer.toString(component.getAutomationThreshold(), 36))); // NOI18N
+ if (automated && component.getAutomationThreshold()
+ != ComponentFactory.getDefaultComponent(id).getAutomationThreshold()) {
+ result.append(String.format("a%s,", Integer.toString(component.getAutomationThreshold(), 36))); // NOI18N
}
- if (automated
- && component.getReactorPause()
- != ComponentFactory.getDefaultComponent(id).getReactorPause()) {
- result.append(
- String.format("p%s,", Integer.toString(component.getReactorPause(), 36))); // NOI18N
+ if (automated && component.getReactorPause()
+ != ComponentFactory.getDefaultComponent(id).getReactorPause()) {
+ result.append(String.format("p%s,", Integer.toString(component.getReactorPause(), 36))); // NOI18N
}
result.setLength(result.length() - 1); // remove the last comma, whichever parameter it came from.
result.append(")");
@@ -675,6 +677,7 @@ public class Reactor {
/**
* Checks whether the reactor is to simulate a fluid-style reactor, rather than a direct EU-output reactor.
+ *
* @return true if this was set to be a fluid-style reactor, false if this was set to be direct EU-output reactor.
*/
public boolean isFluid() {
@@ -683,6 +686,7 @@ public class Reactor {
/**
* Sets whether the reactor is to simulate a fluid-style reactor, rather than a direct EU-output reactor.
+ *
* @param fluid true if this is to be a fluid-style reactor, false if this is to be direct EU-output reactor.
*/
public void setFluid(final boolean fluid) {
@@ -691,6 +695,7 @@ public class Reactor {
/**
* Checks whether the reactor is using Reactor Coolant Injectors (RCIs)
+ *
* @return true if this reactor was set to use RCIs, false otherwise.
*/
public boolean isUsingReactorCoolantInjectors() {
@@ -699,6 +704,7 @@ public class Reactor {
/**
* Sets whether the reactor is to use Reactor Coolant Injectors (RCIs)
+ *
* @param usingReactorCoolantInjectors true if this reactor should use RCIs, false otherwise.
*/
public void setUsingReactorCoolantInjectors(final boolean usingReactorCoolantInjectors) {
diff --git a/src/main/java/Ic2ExpReactorPlanner/SimulationData.java b/src/main/java/Ic2ExpReactorPlanner/SimulationData.java
index 0e32a186cb..614e903250 100644
--- a/src/main/java/Ic2ExpReactorPlanner/SimulationData.java
+++ b/src/main/java/Ic2ExpReactorPlanner/SimulationData.java
@@ -1,12 +1,12 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner;
/**
* Simple container for data from a simulation of an IC2 nuclear reactor, to allow comparison wtih another simulation.
+ *
* @author Brian McCloud
*/
public class SimulationData {
diff --git a/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java b/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java
index 13d73a3df6..1927275485 100644
--- a/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java
+++ b/src/main/java/Ic2ExpReactorPlanner/TaloniusDecoder.java
@@ -4,9 +4,11 @@ import java.math.BigInteger;
/**
* Pulls values out of codes from Talonius's old reactor planner.
+ *
* @author Brian McCloud
*/
public class TaloniusDecoder {
+
private BigInteger dataStack = null;
public TaloniusDecoder(final String dataCode) {
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Condensator.java b/src/main/java/Ic2ExpReactorPlanner/components/Condensator.java
index e4b73aa838..2ae559d9c6 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/Condensator.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/Condensator.java
@@ -1,7 +1,6 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
@@ -9,17 +8,13 @@ import gregtech.api.objects.GT_ItemStack;
/**
* Represents a condensator in a reactor, either RSH or LZH.
+ *
* @author Brian McCloud
*/
public class Condensator extends ReactorItem {
- public Condensator(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod) {
+ public Condensator(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, final String sourceMod) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
}
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/CoolantCell.java b/src/main/java/Ic2ExpReactorPlanner/components/CoolantCell.java
index a9a90ceb6b..ab7b2e5867 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/CoolantCell.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/CoolantCell.java
@@ -1,7 +1,6 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
@@ -9,17 +8,13 @@ import gregtech.api.objects.GT_ItemStack;
/**
* Represents a coolant cell in a reactor.
+ *
* @author Brian McCloud
*/
public class CoolantCell extends ReactorItem {
- public CoolantCell(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod) {
+ public CoolantCell(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, final String sourceMod) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
}
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Exchanger.java b/src/main/java/Ic2ExpReactorPlanner/components/Exchanger.java
index 9c2f470eba..9a168bfa06 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/Exchanger.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/Exchanger.java
@@ -1,16 +1,17 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
-import gregtech.api.objects.GT_ItemStack;
import java.util.ArrayList;
import java.util.List;
+import gregtech.api.objects.GT_ItemStack;
+
/**
* Represents a heat exchanger of some sort in a reactor.
+ *
* @author Brian McCloud
*/
public class Exchanger extends ReactorItem {
@@ -18,15 +19,8 @@ public class Exchanger extends ReactorItem {
private final int switchSide;
private final int switchReactor;
- public Exchanger(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod,
- final int switchSide,
- final int switchReactor) {
+ public Exchanger(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, final String sourceMod, final int switchSide, final int switchReactor) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
this.switchSide = switchSide;
this.switchReactor = switchReactor;
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/FuelRod.java b/src/main/java/Ic2ExpReactorPlanner/components/FuelRod.java
index abeea45a37..2beac5c226 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/FuelRod.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/FuelRod.java
@@ -1,16 +1,17 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
-import gregtech.api.objects.GT_ItemStack;
import java.util.ArrayList;
import java.util.List;
+import gregtech.api.objects.GT_ItemStack;
+
/**
* Represents some form of fuel rod (may be single, dual, or quad).
+ *
* @author Brian McCloud
*/
public class FuelRod extends ReactorItem {
@@ -31,17 +32,9 @@ public class FuelRod extends ReactorItem {
GTNHbehavior = value;
}
- public FuelRod(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod,
- final int energyMult,
- final double heatMult,
- final int rodCount,
- final boolean moxStyle) {
+ public FuelRod(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, final String sourceMod, final int energyMult, final double heatMult,
+ final int rodCount, final boolean moxStyle) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
this.energyMult = energyMult;
this.heatMult = heatMult;
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Plating.java b/src/main/java/Ic2ExpReactorPlanner/components/Plating.java
index de49dfa13c..8a1edf8d8f 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/Plating.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/Plating.java
@@ -1,7 +1,6 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
@@ -9,23 +8,17 @@ import Ic2ExpReactorPlanner.Reactor;
import gregtech.api.objects.GT_ItemStack;
/**
- * Represents some form of plating, which changes how much heat the reactor can
- * hold before causing external effects (up to and including explosion), as well
- * as somewhat reducing explosion power.
+ * Represents some form of plating, which changes how much heat the reactor can hold before causing external effects (up
+ * to and including explosion), as well as somewhat reducing explosion power.
+ *
* @author Brian McCloud
*/
public class Plating extends ReactorItem {
private final int heatAdjustment;
- public Plating(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod,
- final int heatAdjustment,
+ public Plating(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, final String sourceMod, final int heatAdjustment,
final double explosionPowerMultiplier) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
this.heatAdjustment = heatAdjustment;
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java b/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java
index aee7f1c441..8319f6931b 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java
@@ -1,17 +1,16 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
+import java.util.HashMap;
+
import Ic2ExpReactorPlanner.Reactor;
import gregtech.api.objects.GT_ItemStack;
-import java.util.HashMap;
/**
- * Represents an item (component) in an IndustrialCraft2 Experimental Nuclear
- * Reactor.
+ * Represents an item (component) in an IndustrialCraft2 Experimental Nuclear Reactor.
*
* @author Brian McCloud
*/
@@ -206,13 +205,8 @@ public class ReactorItem {
protected double explosionPowerMultiplier = 1;
- protected ReactorItem(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- String sourceMod) {
+ protected ReactorItem(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage,
+ final double maxHeat, String sourceMod) {
this.id = id;
this.baseName = baseName;
this.name = aItem.mItem.getItemStackDisplayName(aItem.toStack());
@@ -262,8 +256,7 @@ public class ReactorItem {
}
/**
- * Checks if this component can accept heat. (e.g. from adjacent fuel rods,
- * or from an exchanger)
+ * Checks if this component can accept heat. (e.g. from adjacent fuel rods, or from an exchanger)
*
* @return true if this component can accept heat, false otherwise.
*/
@@ -274,8 +267,7 @@ public class ReactorItem {
}
/**
- * Determines if this component can be cooled down, such as by a component
- * heat vent.
+ * Determines if this component can be cooled down, such as by a component heat vent.
*
* @return true if this component can be cooled down, false otherwise.
*/
@@ -284,9 +276,8 @@ public class ReactorItem {
}
/**
- * Checks if this component acts as a neutron reflector, and boosts
- * performance of adjacent fuel rods, either by being a "neutron reflector"
- * item or by being a fuel rod.
+ * Checks if this component acts as a neutron reflector, and boosts performance of adjacent fuel rods, either by
+ * being a "neutron reflector" item or by being a fuel rod.
*
* @return true if this component reflects neutrons, false otherwise.
*/
@@ -309,8 +300,7 @@ public class ReactorItem {
}
/**
- * Generate heat if appropriate for component type, and spread to reactor or
- * adjacent cells.
+ * Generate heat if appropriate for component type, and spread to reactor or adjacent cells.
*
* @return the amount of heat generated by this component.
*/
@@ -321,8 +311,7 @@ public class ReactorItem {
/**
* Generate energy if appropriate for component type.
*
- * @return the number of EU generated by this component during the current
- * reactor tick.
+ * @return the number of EU generated by this component during the current reactor tick.
*/
public double generateEnergy() {
return 0.0;
@@ -331,31 +320,26 @@ public class ReactorItem {
/**
* Dissipate (aka vent) heat if appropriate for component type.
*
- * @return the amount of heat successfully vented during the current reactor
- * tick.
+ * @return the amount of heat successfully vented during the current reactor tick.
*/
public double dissipate() {
return 0.0;
}
/**
- * Transfer heat between component, neighbors, and/or reactor, if
- * appropriate for component type.
+ * Transfer heat between component, neighbors, and/or reactor, if appropriate for component type.
*/
public void transfer() {
// do nothing by default.
}
/**
- * Adds this component to a new reactor, and applies changes to the reactor
- * when adding this component if appropriate, such as for reactor plating.
+ * Adds this component to a new reactor, and applies changes to the reactor when adding this component if
+ * appropriate, such as for reactor plating.
*
- * @param parent
- * the reactor to add this component to.
- * @param row
- * the row this component will be in.
- * @param col
- * the column this component will be in.
+ * @param parent the reactor to add this component to.
+ * @param row the row this component will be in.
+ * @param col the column this component will be in.
*/
public void addToReactor(final Reactor parent, final int row, final int col) {
// call removeFromReactor first, in case it had previously been added to
@@ -367,9 +351,8 @@ public class ReactorItem {
}
/**
- * Removes this component from its reactor (if any), and applies changes to
- * the reactor when removing this component if appropriate, such as for
- * reactor plating.
+ * Removes this component from its reactor (if any), and applies changes to the reactor when removing this component
+ * if appropriate, such as for reactor plating.
*/
public void removeFromReactor() {
parent = null;
@@ -395,12 +378,9 @@ public class ReactorItem {
/**
* Adjusts the component heat up or down
*
- * @param heat
- * the amount of heat to adjust by (positive to add heat,
- * negative to remove heat).
- * @return the amount of heat adjustment refused. (e.g. due to going below
- * minimum heat, breaking due to excessive heat, or attempting to
- * remove heat from a condensator)
+ * @param heat the amount of heat to adjust by (positive to add heat, negative to remove heat).
+ * @return the amount of heat adjustment refused. (e.g. due to going below minimum heat, breaking due to excessive
+ * heat, or attempting to remove heat from a condensator)
*/
public double adjustCurrentHeat(final double heat) {
if (isHeatAcceptor()) {
@@ -422,20 +402,18 @@ public class ReactorItem {
}
/**
- * Clears the damage back to 0 (used when resetting simulation, or replacing
- * the component in an automation simulation).
+ * Clears the damage back to 0 (used when resetting simulation, or replacing the component in an automation
+ * simulation).
*/
public final void clearDamage() {
currentDamage = 0.0;
}
/**
- * Applies damage to the component, as opposed to heat. Mainly used for fuel
- * rods and neutron reflectors that lose durability as the reactor runs, but
- * can't recover it via cooling.
+ * Applies damage to the component, as opposed to heat. Mainly used for fuel rods and neutron reflectors that lose
+ * durability as the reactor runs, but can't recover it via cooling.
*
- * @param damage
- * the damage to apply (only used if positive).
+ * @param damage the damage to apply (only used if positive).
*/
public final void applyDamage(final double damage) {
// maxDamage of 1 is treated as meaning the component doesn't accept
@@ -448,23 +426,19 @@ public class ReactorItem {
}
/**
- * Determines if this component is broken in the current tick of the
- * simulation
+ * Determines if this component is broken in the current tick of the simulation
*
- * @return true if the component has broken either from damage (e.g. neutron
- * reflectors, fuel rods) or from heat (e.g. heat vents, coolant
- * cells), false otherwise.
+ * @return true if the component has broken either from damage (e.g. neutron reflectors, fuel rods) or from heat
+ * (e.g. heat vents, coolant cells), false otherwise.
*/
public boolean isBroken() {
return currentHeat >= getMaxHeat() || currentDamage >= getMaxDamage();
}
/**
- * The number of fuel rods in this component (0 for non-fuel-rod
- * components).
+ * The number of fuel rods in this component (0 for non-fuel-rod components).
*
- * @return The number of fuel rods in this component, or 0 if this component
- * has no fuel rods.
+ * @return The number of fuel rods in this component, or 0 if this component has no fuel rods.
*/
public int getRodCount() {
return 0;
@@ -473,9 +447,8 @@ public class ReactorItem {
/**
* Gets a value added in the formula for calculating explosion power.
*
- * @return the additive value for explosion power caused by this component,
- * or 0 if this component doesn't affect the addition part of the
- * explosion calculation.
+ * @return the additive value for explosion power caused by this component, or 0 if this component doesn't affect
+ * the addition part of the explosion calculation.
*/
public double getExplosionPowerOffset() {
if (!isBroken()) {
@@ -493,18 +466,16 @@ public class ReactorItem {
/**
* Gets a value multiplied in the formula for calculating explosion power.
*
- * @return the multiplier value for explosion power caused by this
- * component, or 1 if this component doesn't affect the
- * multiplication part of the explosion calculation.
+ * @return the multiplier value for explosion power caused by this component, or 1 if this component doesn't affect
+ * the multiplication part of the explosion calculation.
*/
public double getExplosionPowerMultiplier() {
return explosionPowerMultiplier;
}
/**
- * Finds the theoretical maximum venting of this component, regardless of
- * whether this venting is from itself, directly from the reactor, or from
- * adjacent components.
+ * Finds the theoretical maximum venting of this component, regardless of whether this venting is from itself,
+ * directly from the reactor, or from adjacent components.
*
* @return the capacity of this component to vent heat.
*/
@@ -515,17 +486,15 @@ public class ReactorItem {
/**
* Finds the theoretical maximum hull cooling of this component.
*
- * @return the capacity of this component to remove heat from the reactor
- * hull.
+ * @return the capacity of this component to remove heat from the reactor hull.
*/
public double getHullCoolingCapacity() {
return 0;
}
/**
- * Gets the current "output" of this component, presumably for writing to
- * CSV data. What this "output" means may vary by component type or reactor
- * type.
+ * Gets the current "output" of this component, presumably for writing to CSV data. What this "output" means may
+ * vary by component type or reactor type.
*
* @return the output of this component for the current reactor tick.
*/
@@ -534,22 +503,21 @@ public class ReactorItem {
}
/**
- * Determines whether this component expects to produces some sort of output
- * each reactor tick, e.g. for purposes of tracking in a CSV file.
+ * Determines whether this component expects to produces some sort of output each reactor tick, e.g. for purposes of
+ * tracking in a CSV file.
*
- * @return true if this component produces output (such as EU or vented
- * heat), false otherwise.
+ * @return true if this component produces output (such as EU or vented heat), false otherwise.
*/
public boolean producesOutput() {
return getVentCoolingCapacity() > 0 || getRodCount() > 0;
}
/**
- * Determines if this component needs input from a Reactor Coolant Injector.
- * Simply returns false for non-condensator items.
+ * Determines if this component needs input from a Reactor Coolant Injector. Simply returns false for
+ * non-condensator items.
*
- * @return true if this is a condensator that has absorbed enough heat to
- * require the appropriate item added to repair it, false otherwise.
+ * @return true if this is a condensator that has absorbed enough heat to require the appropriate item added to
+ * repair it, false otherwise.
*/
public boolean needsCoolantInjected() {
return false;
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java b/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java
index bca0e9f43a..f0b16f3d14 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/Reflector.java
@@ -1,7 +1,6 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
@@ -9,19 +8,15 @@ import gregtech.api.objects.GT_ItemStack;
/**
* Represents a neutron reflector in a reactor.
+ *
* @author Brian McCloud
*/
public class Reflector extends ReactorItem {
private static String mcVersion = "1.12.2";
- public Reflector(
- final int id,
- final String baseName,
- final GT_ItemStack aStack,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod) {
+ public Reflector(final int id, final String baseName, final GT_ItemStack aStack, final double maxDamage,
+ final double maxHeat, final String sourceMod) {
super(id, baseName, aStack, maxDamage, maxHeat, sourceMod);
}
diff --git a/src/main/java/Ic2ExpReactorPlanner/components/Vent.java b/src/main/java/Ic2ExpReactorPlanner/components/Vent.java
index 9eb9f3aa66..e0f26416ac 100644
--- a/src/main/java/Ic2ExpReactorPlanner/components/Vent.java
+++ b/src/main/java/Ic2ExpReactorPlanner/components/Vent.java
@@ -1,16 +1,17 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * To change this license header, choose License Headers in Project Properties. To change this template file, choose
+ * Tools | Templates and open the template in the editor.
*/
package Ic2ExpReactorPlanner.components;
-import gregtech.api.objects.GT_ItemStack;
import java.util.ArrayList;
import java.util.List;
+import gregtech.api.objects.GT_ItemStack;
+
/**
* Represents some kind of vent in a reactor.
+ *
* @author Brian McCloud
*/
public class Vent extends ReactorItem {
@@ -19,16 +20,8 @@ public class Vent extends ReactorItem {
private final int hullDraw;
private final int sideVent;
- public Vent(
- final int id,
- final String baseName,
- GT_ItemStack aItem,
- final double maxDamage,
- final double maxHeat,
- final String sourceMod,
- final int selfVent,
- final int hullDraw,
- final int sideVent) {
+ public Vent(final int id, final String baseName, GT_ItemStack aItem, final double maxDamage, final double maxHeat,
+ final String sourceMod, final int selfVent, final int hullDraw, final int sideVent) {
super(id, baseName, aItem, maxDamage, maxHeat, sourceMod);
this.selfVent = selfVent;
this.hullDraw = hullDraw;