mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 21:20:06 +00:00
Flux modifier now requires the tool to have at least charge/1000 durability for the battery to be applicable.
This commit is contained in:
1 parent
2aa42a5b8a
commit
f734169ad6
1 file changed
+6
@@ -46,6 +46,12 @@ public class ModFlux extends ModBoolean
|
||||
if (foundBattery == null)
|
||||
return false;
|
||||
|
||||
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
|
||||
return false;
|
||||
|
||||
// check if we already have a flux modifier
|
||||
if (tags.getBoolean(key))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user