aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorくぁーりぃ <39122497+Quarri6343@users.noreply.github.com>2022-11-16 19:54:36 +0900
committerGitHub <noreply@github.com>2022-11-16 11:54:36 +0100
commite4efbda8c8e3453005b223c3fd846b8f142883c7 (patch)
tree7a5a59d3a58eb94ebfda9cdf639a8829e14119c7 /src/main
parent3cf1f73bebfd0b8fe511fa9f454a85e2fa8423a7 (diff)
downloadGT5-Unofficial-e4efbda8c8e3453005b223c3fd846b8f142883c7.tar.gz
GT5-Unofficial-e4efbda8c8e3453005b223c3fd846b8f142883c7.tar.bz2
GT5-Unofficial-e4efbda8c8e3453005b223c3fd846b8f142883c7.zip
fix AOOBE by fixing array config loading (#1516)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_PreLoad.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
index 83190f7621..1b8faab242 100644
--- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
+++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java
@@ -760,24 +760,37 @@ public class GT_PreLoad {
"PollutionBaseDieselGenerator",
GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond)
.getInt(GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond);
- GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = tMainConfig
+ double[] mPollutionDieselGeneratorReleasedByTier = tMainConfig
.get(
"Pollution",
"PollutionReleasedByTierDieselGenerator",
GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier)
.getDoubleList();
+ if (mPollutionDieselGeneratorReleasedByTier.length
+ == GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier.length) {
+ GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = mPollutionDieselGeneratorReleasedByTier;
+ } else {
+ GT_FML_LOGGER.error(
+ "The Length of the Diesel Turbine Pollution Array Config must be the same as the Default");
+ }
GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig
.get(
"Pollution",
"PollutionBaseGasTurbineGenerator",
GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond)
.getInt(GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond);
- GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = tMainConfig
+ double[] mPollutionGasTurbineReleasedByTier = tMainConfig
.get(
"Pollution",
"PollutionReleasedByTierGasTurbineGenerator",
GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier)
.getDoubleList();
+ if (mPollutionGasTurbineReleasedByTier.length
+ == GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier.length) {
+ GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier = mPollutionGasTurbineReleasedByTier;
+ } else {
+ GT_FML_LOGGER.error("The Length of the Gas Turbine Pollution Array Config must be the same as the Default");
+ }
GT_Mod.gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid");
GT_Mod.gregtechproxy.mEnableCleanroom =