aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/elisis
diff options
context:
space:
mode:
authorElisis <gtandemmodding@gmail.com>2024-07-22 22:02:54 +1000
committerGitHub <noreply@github.com>2024-07-22 19:02:54 +0700
commite9c78bd3c57a0a499132de892a94fb6d7fffb32e (patch)
tree7a9ac073206e93976b1efe3950c77d39c63bbfb8 /src/main/java/com/elisis
parentf1ca38024d543f03001fb2837d4a92a5a39193b5 (diff)
downloadGT5-Unofficial-e9c78bd3c57a0a499132de892a94fb6d7fffb32e.tar.gz
GT5-Unofficial-e9c78bd3c57a0a499132de892a94fb6d7fffb32e.tar.bz2
GT5-Unofficial-e9c78bd3c57a0a499132de892a94fb6d7fffb32e.zip
Beamline Balancing and Fix (#2749)
* Fix weird t2 antenna issue and partly the electron scaling issue * Decrease LINAC energy scaling but increase max possible energy * Improve antenna tier scaling, make input-output energy curve more shallow at lower input energies * Spotless apply for branch beamline-fixes-1 for #2749 (#2750) spotlessApply Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com/elisis')
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java4
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java15
2 files changed, 11 insertions, 8 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java
index c9d9b125b4..e456813bc6 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java
@@ -343,7 +343,7 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple
outputEnergy = Math.min(
(1 + inputEnergy / Particle.getParticleFromId(outputParticle)
.maxSourceEnergy()) * machineEnergy,
- 100_000); // TODO more complex calculation than just
+ 120_000); // TODO more complex calculation than just
// addition
inputRate = this.getInputInformation()
@@ -554,7 +554,7 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple
private static float calculateVoltageFactor(long voltage) {
- float factor = (float) Math.pow(1.00009, -(voltage - 125000));
+ float factor = (float) Math.pow(1.00009, -(0.1 * voltage - 114000));
return factor;
}
diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java
index 3eaa682381..6733bc5338 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java
@@ -764,6 +764,7 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr
inputRate = this.getInputInformation()
.getRate();
+
outputRate = (int) (inputRate * getOutputRatetio(voltageFactor, this.antennaeTier));
if (outputRate == 0) {
@@ -850,7 +851,7 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr
float factor = (float) -Math.pow(1.1, -mEU / 2000 * Math.pow(antennaTier, 2.0 / 3.0)) + 1; // Strictly improves
// with higher tier
// antenna
- return factor;
+ return (float) Math.max(1.0, factor);
}
@@ -871,8 +872,8 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr
* \ +\ \frac{l^{1.11t^{\frac{1}{3}}}}{40000000}
*/
- double energy = (Math.pow(inputParticleEnergy, 1.13 * Math.pow(antennaTier, 1.0 / 3.0)) / 40_000_000)
- * (-Math.pow(Math.pow(0.15, 2.0 / (Math.pow(antennaTier, 3.0 / 2.0))), voltage / 60768.0) + 1); // In
+ double energy = (Math.pow(inputParticleEnergy, 1.13 * Math.pow(antennaTier, 4.0 / 9.0)) / 40_000_000)
+ * (-Math.pow(Math.pow(0.15, 2.0 / (Math.pow(antennaTier, 5.0 / 2.0))), voltage / 60768.0) + 1); // In
// keV
return energy;
@@ -886,9 +887,11 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr
// Punny, right?
private static float getOutputRatetio(float voltageFactor, int antennaTier) {
- return (float) (voltageFactor / 10 / Math.pow(2.5, antennaTier)); // Scale ratio with antenna tier, such a high
- // exponential should be fine so long as there
- // are only few antenna tiers
+ return (float) (voltageFactor / (10 / Math.pow(2.5, antennaTier))); // Scale ratio with antenna tier, such a
+ // high
+ // exponential should be fine so long as
+ // there
+ // are only few antenna tiers
}
@Override