Closes #1269 again™️

This commit is contained in:
Shadows_of_Fire 2019-07-25 19:11:49 -04:00
parent de01551a94
commit a296419857
2 changed files with 8 additions and 2 deletions

View file

@ -143,7 +143,12 @@ public enum ConfigBoolValues {
"Ore Gen Whitelist", "Ore Gen Whitelist",
ConfigCategories.WORLD_GEN, ConfigCategories.WORLD_GEN,
false, false,
"If true, the ore gen dimension blacklist will be treated as a whitelist."); "If true, the ore gen dimension blacklist will be treated as a whitelist."),
MINING_LENS_ADAPTED_USE(
"Mining Lens Math",
ConfigCategories.MACHINE_VALUES,
true,
"If true, the mining lens uses some weird math to calculate energy costs.");
public final String name; public final String name;
public final String category; public final String category;

View file

@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre; import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
@ -147,7 +148,7 @@ public class LensMining extends Lens {
if (stacks != null && !stacks.isEmpty()) { if (stacks != null && !stacks.isEmpty()) {
for (ItemStack aStack : stacks) { for (ItemStack aStack : stacks) {
if (StackUtil.isValid(aStack) && !CrusherRecipeRegistry.hasBlacklistedOutput(aStack, ConfigStringListValues.MINING_LENS_BLACKLIST.getValue()) && aStack.getItem() instanceof ItemBlock) { if (StackUtil.isValid(aStack) && !CrusherRecipeRegistry.hasBlacklistedOutput(aStack, ConfigStringListValues.MINING_LENS_BLACKLIST.getValue()) && aStack.getItem() instanceof ItemBlock) {
adaptedUse += (totalWeight - ore.itemWeight) % 40000; if (ConfigBoolValues.MINING_LENS_ADAPTED_USE.isEnabled()) adaptedUse += (totalWeight - ore.itemWeight) % 40000;
stack = aStack; stack = aStack;
found = true; found = true;