This commit is contained in:
Shadows_of_Fire 2019-07-08 22:51:10 -04:00
parent a0ae761660
commit 132b71f4a1
2 changed files with 11 additions and 5 deletions

View file

@ -98,7 +98,14 @@ public enum ConfigIntValues {
9, 9,
1, 1,
Integer.MAX_VALUE, Integer.MAX_VALUE,
"The size of the farmer's farming area. Default is 9x9, must be an odd number."); "The size of the farmer's farming area. Default is 9x9, must be an odd number."),
MINING_LENS_USE(
"Mining Lens Energy",
ConfigCategories.MACHINE_VALUES,
60000,
1,
Integer.MAX_VALUE,
"The energy use of the Atomic Reconstructor's Mining Lens.");
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.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;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
@ -37,8 +38,6 @@ import net.minecraftforge.oredict.OreDictionary;
public class LensMining extends Lens { public class LensMining extends Lens {
public static final int ENERGY_USE = 60000;
public static void init() { public static void init() {
ActuallyAdditionsAPI.addMiningLensStoneOre("oreCoal", 5000); ActuallyAdditionsAPI.addMiningLensStoneOre("oreCoal", 5000);
ActuallyAdditionsAPI.addMiningLensNetherOre("oreNetherCoal", 5000); ActuallyAdditionsAPI.addMiningLensNetherOre("oreNetherCoal", 5000);
@ -124,8 +123,8 @@ public class LensMining extends Lens {
@Override @Override
public boolean invoke(IBlockState hitState, BlockPos hitPos, IAtomicReconstructor tile) { public boolean invoke(IBlockState hitState, BlockPos hitPos, IAtomicReconstructor tile) {
if (!tile.getWorldObject().isAirBlock(hitPos)) { if (!tile.getWorldObject().isAirBlock(hitPos)) {
if (tile.getEnergy() >= ENERGY_USE) { if (tile.getEnergy() >= ConfigIntValues.MINING_LENS_USE.getValue()) {
int adaptedUse = ENERGY_USE; int adaptedUse = ConfigIntValues.MINING_LENS_USE.getValue();
List<WeightedOre> ores = null; List<WeightedOre> ores = null;
Block hitBlock = hitState.getBlock(); Block hitBlock = hitState.getBlock();