aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks/system/material
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-09-14 22:35:51 +0200
committerGitHub <noreply@github.com>2024-09-14 20:35:51 +0000
commit9c18caf7fc642a21efad6673e59db85f5b66ab88 (patch)
treedbd10650e51b45b94eb47734c76ca43ea6226e7a /src/main/java/bartworks/system/material
parent0d2de2fef9148b2284d700810aad18a6139f1130 (diff)
downloadGT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.gz
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.bz2
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.zip
Port BW config to GTNHLib (#3169)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/bartworks/system/material')
-rw-r--r--src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java6
-rw-r--r--src/main/java/bartworks/system/material/WerkstoffLoader.java5
-rw-r--r--src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java47
3 files changed, 5 insertions, 53 deletions
diff --git a/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
index c81f62e2ab..8e04f770f8 100644
--- a/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
+++ b/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
@@ -35,7 +35,6 @@ import com.google.common.collect.HashBiMap;
import bartworks.API.recipe.BWNBTDependantCraftingRecipe;
import bartworks.API.recipe.BartWorksRecipeMaps;
import bartworks.ASM.BWCoreStaticReplacementMethodes;
-import bartworks.common.configs.ConfigHandler;
import bartworks.system.material.WerkstoffLoader;
import bartworks.util.BWUtil;
import bartworks.util.Pair;
@@ -43,6 +42,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTOreDictUnificator;
@@ -113,7 +113,7 @@ public class CircuitImprintLoader {
GTRecipe newRecipe = CircuitImprintLoader.reBuildRecipe(circuitRecipe);
if (newRecipe != null) BartWorksRecipeMaps.circuitAssemblyLineRecipes.addRecipe(newRecipe);
addCutoffRecipeToSets(toRem, toAdd, circuitRecipe);
- } else if (circuitRecipe.mEUt > BWUtil.getTierVoltage(ConfigHandler.cutoffTier)) toRem.add(circuitRecipe);
+ } else if (circuitRecipe.mEUt > TierEU.IV) toRem.add(circuitRecipe);
}
}
@@ -133,7 +133,7 @@ public class CircuitImprintLoader {
private static void addCutoffRecipeToSets(HashSet<GTRecipe> toRem, HashSet<GTRecipe> toAdd,
GTRecipe circuitRecipe) {
- if (circuitRecipe.mEUt > BWUtil.getTierVoltage(ConfigHandler.cutoffTier)) {
+ if (circuitRecipe.mEUt > TierEU.IV) {
toRem.add(circuitRecipe);
toAdd.add(CircuitImprintLoader.makeMoreExpensive(circuitRecipe));
}
diff --git a/src/main/java/bartworks/system/material/WerkstoffLoader.java b/src/main/java/bartworks/system/material/WerkstoffLoader.java
index 858fda7a58..a1b1aac2ed 100644
--- a/src/main/java/bartworks/system/material/WerkstoffLoader.java
+++ b/src/main/java/bartworks/system/material/WerkstoffLoader.java
@@ -95,7 +95,6 @@ import bartworks.API.SideReference;
import bartworks.API.WerkstoffAdderRegistry;
import bartworks.MainMod;
import bartworks.client.renderer.BWBlockOreRenderer;
-import bartworks.common.configs.ConfigHandler;
import bartworks.system.material.CircuitGeneration.BWCircuitsLoader;
import bartworks.system.material.gtenhancement.GTMetaItemEnhancer;
import bartworks.system.material.processingLoaders.AdditionalRecipes;
@@ -1956,11 +1955,11 @@ public class WerkstoffLoader {
GameRegistry.registerBlock(WerkstoffLoader.BWOres, BWItemMetaGeneratedBlock.class, "bw.blockores.01");
GameRegistry.registerBlock(WerkstoffLoader.BWSmallOres, BWItemMetaGeneratedBlock.class, "bw.blockores.02");
GameRegistry.registerBlock(WerkstoffLoader.BWBlocks, BWItemMetaGeneratedBlock.class, "bw.werkstoffblocks.01");
- if (!ConfigHandler.disableBoltedBlocksCasing) GameRegistry.registerBlock(
+ GameRegistry.registerBlock(
WerkstoffLoader.BWBlockCasings,
BWItemMetaGeneratedBlock.class,
"bw.werkstoffblockscasing.01");
- if (!ConfigHandler.disableReboltedBlocksCasing) GameRegistry.registerBlock(
+ GameRegistry.registerBlock(
WerkstoffLoader.BWBlockCasingsAdvanced,
BWItemMetaGeneratedBlock.class,
"bw.werkstoffblockscasingadvanced.01");
diff --git a/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java b/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java
deleted file mode 100644
index 7be8b72bf0..0000000000
--- a/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
- * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial
- * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-package bartworks.system.material.processingLoaders;
-
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import bartworks.util.BWUtil;
-import bartworks.util.StreamUtils;
-import gregtech.api.recipe.RecipeMap;
-import gregtech.api.recipe.RecipeMaps;
-import gregtech.api.util.GTRecipe;
-
-public class DownTierLoader {
-
- public static void run() {
- RecipeMap.ALL_RECIPE_MAPS.values()
- .stream()
- .filter(map -> StreamUtils.filterVisualMaps(map) && map != RecipeMaps.fusionRecipes)
- .forEach(map -> {
- Set<GTRecipe> newRecipes = new HashSet<>();
- Set<GTRecipe> toRem = new HashSet<>();
- map.getAllRecipes()
- .stream()
- .filter(recipe -> Objects.nonNull(recipe) && recipe.mEUt > 128)
- .forEach(recipe -> {
- toRem.add(recipe);
- newRecipes.add(BWUtil.copyAndSetTierToNewRecipe(recipe, (byte) 2));
- });
- map.getBackend()
- .removeRecipes(toRem);
- newRecipes.forEach(map::add);
- });
- }
-}