diff options
Diffstat (limited to 'src')
3 files changed, 18 insertions, 24 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 415b5af36c..30c1276f97 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -224,9 +224,6 @@ public final class MainMod { recipesAdded = true; } - StaticRecipeChangeLoaders.fixEnergyRequirements(); - // StaticRecipeChangeLoaders.synchroniseCircuitUseMulti(); - // Accept recipe map changes into Buffers RecipeMap.ALL_RECIPE_MAPS.values() .forEach( diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java index 4271b43303..9d9de87173 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java @@ -18,7 +18,6 @@ import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.NOBLE_GAS; import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.fluids; import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.molten; -import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Mods.TinkerConstruct; import static gregtech.api.enums.TickTime.TICK; @@ -43,7 +42,6 @@ import com.github.bartimaeusnek.bartworks.API.recipe.DynamicGTRecipe; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.StreamUtils; import com.github.bartimaeusnek.bartworks.util.log.DebugLog; import com.github.bartimaeusnek.crossmod.BartWorksCrossmod; import com.google.common.collect.ArrayListMultimap; @@ -105,23 +103,6 @@ public class StaticRecipeChangeLoaders { editRecipes(toChange, getNoGasItems(toChange)); } - public static void fixEnergyRequirements() { - RecipeMap.ALL_RECIPE_MAPS.values() - .stream() - .filter(StreamUtils::filterVisualMaps) - .forEach( - recipeMap -> recipeMap.getAllRecipes() - .parallelStream() - .forEach(gt_recipe -> { - for (int i = 0; i < VN.length - 1; i++) { - if (gt_recipe.mEUt > BW_Util.getMachineVoltageFromTier(i) - && gt_recipe.mEUt <= BW_Util.getTierVoltage(i)) { - gt_recipe.mEUt = BW_Util.getMachineVoltageFromTier(i); - } - } - })); - } - public static void unificationRecipeEnforcer() { List<GT_Recipe> toRemove = new ArrayList<>(); for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { diff --git a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java index 66bc11444a..27af090883 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java +++ b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java @@ -23,6 +23,7 @@ import net.minecraftforge.fluids.FluidStack; import org.jetbrains.annotations.Contract; import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.Mods; import gregtech.api.interfaces.IRecipeMap; import gregtech.api.recipe.RecipeCategory; @@ -38,6 +39,7 @@ public class GT_RecipeBuilder { private static final boolean DEBUG_MODE_NULL; private static boolean PANIC_MODE_NULL; private static final boolean DEBUG_MODE_INVALID; + private static final boolean DEBUG_MODE_FULL_ENERGY; private static final boolean PANIC_MODE_INVALID; private static final boolean DEBUG_MODE_COLLISION; private static final boolean PANIC_MODE_COLLISION; @@ -70,6 +72,7 @@ public class GT_RecipeBuilder { DEBUG_MODE_NULL = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.null"); DEBUG_MODE_INVALID = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.invalid"); DEBUG_MODE_COLLISION = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.collision"); + DEBUG_MODE_FULL_ENERGY = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.fullenergy"); final boolean panicAll = Boolean.getBoolean("gt.recipebuilder.panic"); PANIC_MODE_NULL = panicAll || Boolean.getBoolean("gt.recipebuilder.panic.null"); @@ -345,13 +348,26 @@ public class GT_RecipeBuilder { } public GT_RecipeBuilder eut(int eut) { + if (DEBUG_MODE_FULL_ENERGY) { + // Ignores ULV voltage + for (int i = 1; i < GT_Values.VP.length; i++) { + if (eut <= GT_Values.V[i]) { + if (eut > GT_Values.VP[i]) { + GT_Log.err.println( + "EUt > Practical Voltage detected. EUt: " + eut + + ", Practical Voltage: " + + GT_Values.VP[i]); + new IllegalArgumentException().printStackTrace(GT_Log.err); + } + } else break; + } + } this.eut = eut; return this; } public GT_RecipeBuilder eut(long eut) { - this.eut = (int) eut; - return this; + return eut((int) eut); } /** |