Config option to disable the flux modifier battery restriction in case ti's needed somewhere. (Looking at you there, HQM Maps.)

This commit is contained in:
Bernhard Bonigl committed 2014-10-25 18:51:38 +02:00
1 parent 735360f2c6
commit f027de5ab9
2 files changed
+4 -1

No files matched your search

@@ -5,6 +5,7 @@ import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.library.tools.ToolCore;
import tconstruct.util.config.PHConstruct;
/* TE3 support */
@@ -49,7 +50,7 @@ public class ModFlux extends ModBoolean
int maxEnergy = ((IEnergyContainerItem) foundBattery.getItem()).getMaxEnergyStored(foundBattery);
// battery too big for our tool?
if(tags.getInteger("TotalDurability") < maxEnergy/1000) // durability needs to be at least 1/1000th of the charge
if(PHConstruct.balancedFluxModifier && tags.getInteger("TotalDurability") < maxEnergy/1000) // durability needs to be at least 1/1000th of the charge
return false;
// check if we already have a flux modifier
@@ -44,6 +44,7 @@ public class PHConstruct
keepLevels = config.get("Difficulty Changes", "Keep levels on death", true).getBoolean(true);
beginnerBook = config.get("Difficulty Changes", "Spawn beginner book", true).getBoolean(true);
deathPenality = config.get("Difficulty Changes", "Tools lose 10% durability on death", true).getBoolean(true);
balancedFluxModifier = config.get("Difficulty Changes", "Balanced Flux Modifier", true).getBoolean(true);
enableTWood = config.get("Difficulty Changes", "Enable mod wooden tools", true).getBoolean(true);
enableTStone = config.get("Difficulty Changes", "Enable mod stone tools", true).getBoolean(true);
@@ -290,6 +291,7 @@ public class PHConstruct
public static boolean deathPenality;
public static boolean alphaRegen;
public static boolean alphaHunger;
public static boolean balancedFluxModifier;
public static boolean disableWoodTools;
public static boolean disableStoneTools;