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