aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorevgengoldwar <69961523+evgengoldwar@users.noreply.github.com>2024-09-09 23:35:26 +0300
committerGitHub <noreply@github.com>2024-09-09 20:35:26 +0000
commit21d2fdb35086f194ec929f90f0bd3f4a000afab8 (patch)
treea331e54939d3cd71aa54ee519e81310eb468778c /src/main/java
parent753ef212f826aa6bb4e1b35aa8f44cdd03d970b3 (diff)
downloadGT5-Unofficial-21d2fdb35086f194ec929f90f0bd3f4a000afab8.tar.gz
GT5-Unofficial-21d2fdb35086f194ec929f90f0bd3f4a000afab8.tar.bz2
GT5-Unofficial-21d2fdb35086f194ec929f90f0bd3f4a000afab8.zip
Rebalance Steam multi (#3108)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java62
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java13
6 files changed, 39 insertions, 88 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java
index ec616b9d10..51f8504144 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java
@@ -287,7 +287,7 @@ public class MTESteamCentrifuge extends MTESteamMultiBase<MTESteamCentrifuge> im
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -312,15 +312,15 @@ public class MTESteamCentrifuge extends MTESteamMultiBase<MTESteamCentrifuge> im
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -330,9 +330,8 @@ public class MTESteamCentrifuge extends MTESteamMultiBase<MTESteamCentrifuge> im
.addInfo("Controller Block for the Steam Centrifuge")
.addInfo("33.3% faster than a single block steam machine would run")
.addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(5, 5, 5, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java
index a4ecc3f3e8..8ca445622a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java
@@ -228,7 +228,7 @@ public class MTESteamCompressor extends MTESteamMultiBase<MTESteamCompressor> im
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -256,15 +256,15 @@ public class MTESteamCompressor extends MTESteamMultiBase<MTESteamCompressor> im
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -274,9 +274,8 @@ public class MTESteamCompressor extends MTESteamMultiBase<MTESteamCompressor> im
.addInfo("Controller Block for the Steam Compressor")
.addInfo("33.3% faster than the single block Steam Compressor")
.addInfo("Uses only 66.6% of the steam/s that the single block Steam Compressor uses")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(3, 3, 4, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java
index 74a1c649c3..1209b9c0bc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java
@@ -275,7 +275,7 @@ public class MTESteamForgeHammer extends MTESteamMultiBase<MTESteamForgeHammer>
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -306,15 +306,15 @@ public class MTESteamForgeHammer extends MTESteamMultiBase<MTESteamForgeHammer>
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -324,9 +324,8 @@ public class MTESteamForgeHammer extends MTESteamMultiBase<MTESteamForgeHammer>
.addInfo("Controller Block for the Steam Forge Hammer")
.addInfo("33.3% faster than the single block Steam Forge Hammer")
.addInfo("Uses only 66.6% of the steam/s that the single block Forge Hammer uses")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(6, 5, 5, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java
index 753628caf5..5478dc303c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java
@@ -224,7 +224,7 @@ public class MTESteamMacerator extends MTESteamMultiBase<MTESteamMacerator> impl
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -255,15 +255,15 @@ public class MTESteamMacerator extends MTESteamMultiBase<MTESteamMacerator> impl
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -273,9 +273,8 @@ public class MTESteamMacerator extends MTESteamMultiBase<MTESteamMacerator> impl
.addInfo("Controller Block for the Steam Macerator")
.addInfo("33.3% faster than the single block Steam Macerator")
.addInfo("Uses only 66.6% of the steam/s that the single block Steam Macerator uses")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(3, 3, 3, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java
index 7c5cdb543b..6429d556c5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.steam;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
@@ -8,15 +9,11 @@ import static gregtech.api.GregTechAPI.sBlockCasings2;
import static gregtech.api.enums.GTValues.AuthorEvgenWarGold;
import static gregtech.api.enums.HatchElement.InputHatch;
import static gregtech.api.enums.HatchElement.OutputHatch;
-import static gregtech.api.enums.Mods.EnderIO;
import static gregtech.api.util.GTStructureUtility.buildHatchAdder;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
import javax.annotation.Nonnull;
@@ -39,10 +36,8 @@ import com.google.common.collect.ImmutableList;
import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
-import com.gtnewhorizon.structurelib.structure.ITierConverter;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
-import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTechAPI;
@@ -112,10 +107,6 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
private int tierMachine = 1;
- private int tierSimpleBlock = 0;
-
- Map<Block, Integer> simpleBlockTiers = new HashMap<>();
-
public int getTierMachineCasing(Block block, int meta) {
if (block == sBlockCasings1 && 10 == meta) {
tCountCasing++;
@@ -140,25 +131,6 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
return 0;
}
- private static List<Pair<Block, Integer>> getAllSimpleBlockTiers(Map<Block, Integer> simpleBlockTiers) {
- return simpleBlockTiers.entrySet()
- .stream()
- .map(e -> Pair.of(e.getKey(), e.getValue()))
- .collect(Collectors.toList());
- }
-
- private static ITierConverter<Integer> simpleBlockTierConverter(Map<Block, Integer> simpleBlockTiers) {
- return (block, meta) -> block == null ? 0 : simpleBlockTiers.getOrDefault(block, 1);
- }
-
- private void setSimpleBlockTier(int tier) {
- tierSimpleBlock = tier;
- }
-
- private int getSimpleBlockTier() {
- return tierSimpleBlock;
- }
-
protected void updateHatchTexture() {
for (MTEHatch h : mSteamInputs) h.updateTexture(getCasingTextureID());
for (MTEHatch h : mSteamOutputs) h.updateTexture(getCasingTextureID());
@@ -168,7 +140,7 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
}
private int getCasingTextureID() {
- if (tierGearBoxCasing == 2 || tierPipeCasing == 2 || tierMachineCasing == 2 || tierSimpleBlock == 2)
+ if (tierGearBoxCasing == 2 || tierPipeCasing == 2 || tierMachineCasing == 2)
return ((BlockCasings2) GregTechAPI.sBlockCasings2).getTextureIndex(0);
return ((BlockCasings1) GregTechAPI.sBlockCasings1).getTextureIndex(10);
}
@@ -206,11 +178,6 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
@Override
public IStructureDefinition<MTESteamMixer> getStructureDefinition() {
if (STRUCTURE_DEFINITION == null) {
- simpleBlockTiers.put(Blocks.iron_block, 1);
-
- if (EnderIO.isModLoaded()) {
- simpleBlockTiers.put(GameRegistry.findBlock(EnderIO.ID, "blockIngotStorage"), 6);
- } else simpleBlockTiers.put(Blocks.iron_block, 2);
STRUCTURE_DEFINITION = StructureDefinition.<MTESteamMixer>builder()
@@ -231,14 +198,7 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
-1,
(t, m) -> t.tierPipeCasing = m,
t -> t.tierPipeCasing))
- .addElement(
- 'D',
- ofBlocksTiered(
- simpleBlockTierConverter(simpleBlockTiers),
- getAllSimpleBlockTiers(simpleBlockTiers),
- -1,
- MTESteamMixer::setSimpleBlockTier,
- MTESteamMixer::getSimpleBlockTier))
+ .addElement('D', ofBlock(Blocks.iron_block, 0))
.addElement(
'A',
ofChain(
@@ -292,13 +252,11 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
tierGearBoxCasing = -1;
tierPipeCasing = -1;
- tierSimpleBlock = -1;
tierMachineCasing = -1;
tCountCasing = 0;
if (!checkPiece(STRUCTUR_PIECE_MAIN, HORIZONTAL_OFF_SET, VERTICAL_OFF_SET, DEPTH_OFF_SET)) return false;
if (tierGearBoxCasing < 0 && tierPipeCasing < 0 && tierMachineCasing < 0) return false;
if (tierGearBoxCasing == 1 && tierPipeCasing == 1
- && tierSimpleBlock == 1
&& tierMachineCasing == 1
&& tCountCasing > 90
&& !mSteamInputFluids.isEmpty()
@@ -311,7 +269,6 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
return true;
}
if (tierGearBoxCasing == 2 && tierPipeCasing == 2
- && tierSimpleBlock == 2
&& tierMachineCasing == 2
&& tCountCasing > 90
&& !mSteamInputFluids.isEmpty()
@@ -328,7 +285,7 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -353,15 +310,15 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -371,9 +328,8 @@ public class MTESteamMixer extends MTESteamMultiBase<MTESteamMixer> implements I
.addInfo("Controller Block for the Steam Mixer")
.addInfo("33.3% faster than a single block steam machine would run")
.addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(7, 6, 7, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java
index 21ac06bc88..6b6bc4ca62 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java
@@ -293,7 +293,7 @@ public class MTESteamWasher extends MTESteamMultiBase<MTESteamWasher> implements
@Override
public int getMaxParallelRecipes() {
- return tierMachine == 1 ? 8 : 16;
+ return 8;
}
@Override
@@ -331,15 +331,15 @@ public class MTESteamWasher extends MTESteamMultiBase<MTESteamWasher> implements
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
- .setEUtDiscount(1.33)
- .setSpeedBoost(1.5);
+ .setEUtDiscount(1.33 * tierMachine)
+ .setSpeedBoost(1.5 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
@Override
public int getTierRecipes() {
- return tierMachine == 1 ? 1 : 2;
+ return 1;
}
@Override
@@ -349,9 +349,8 @@ public class MTESteamWasher extends MTESteamMultiBase<MTESteamWasher> implements
.addInfo("Controller Block for the Steam Washer")
.addInfo("33.3% faster than a single block steam machine would run")
.addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use")
- .addInfo("Bronze tier runs recipes up to LV tier")
- .addInfo("Steel tier runs recipes up to MV tier")
- .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier")
+ .addInfo("Processes 8x parallel")
+ .addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addSeparator()
.beginStructureBlock(5, 5, 5, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)