mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-27 15:23:00 +00:00
Add option to disallow adding modifiers with netherstars etc.
This commit is contained in:
1 parent
665f0fff02
commit
fccd5366fa
2 files changed
+20
No files matched your search
@@ -62,6 +62,7 @@ public class Config {
|
||||
public static boolean addFlintRecipe;
|
||||
public static int recipeGravelPerFlint;
|
||||
public static boolean disableStoneTools;
|
||||
public static boolean disableBonusMods;
|
||||
public static boolean castsBurnMaterial;
|
||||
public static boolean allowStringBinding;
|
||||
|
||||
@@ -200,6 +201,7 @@ public class Config {
|
||||
allowStencilReuse = configfile.getBoolean("allowStencilReuse", CATEGORY_Tweaks, false, "Allows to use stencils as blank patterns in the stencil table");
|
||||
allowPartReuse = configfile.getBoolean("allowPartReuse", CATEGORY_Tweaks, true, "Allows toolparts to be used as material in the Part Builder. Like, turn a Pick head into a Shovel head.!");
|
||||
allowStringBinding= configfile.getBoolean("allowStringBinding", CATEGORY_Tweaks, true, "Allows you to use a piece of string as a binding");
|
||||
disableBonusMods = configfile.getBoolean("disableBonusModifierModifiers", CATEGORY_Tweaks, false, "Removes the ability to add modifiers with Gold, Diamond, Netherstars etc.");
|
||||
|
||||
// easy crafting
|
||||
easyToolRepair = configfile.getBoolean("easyToolRepair", CATEGORY_Tweaks, true, "Allows to repair your tool in a crafting grid, without tool station");
|
||||
|
||||
@@ -25,6 +25,7 @@ import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.crafting.*;
|
||||
import tconstruct.library.modifier.ItemModifier;
|
||||
import tconstruct.library.util.IPattern;
|
||||
import tconstruct.modifiers.tools.ModExtraModifier;
|
||||
import tconstruct.modifiers.tools.ModFlux;
|
||||
import tconstruct.modifiers.tools.ModToolRepair;
|
||||
import tconstruct.smeltery.TinkerSmeltery;
|
||||
@@ -152,6 +153,9 @@ public class IguanaTweaks {
|
||||
|
||||
if(Config.moreModifiersForFlux)
|
||||
exchangeFluxModifier();
|
||||
|
||||
if(Config.disableBonusMods)
|
||||
removeBonusModifierModifiers();
|
||||
|
||||
if(Config.maxToolRepairs > -1)
|
||||
limitToolRepair();
|
||||
@@ -220,6 +224,20 @@ public class IguanaTweaks {
|
||||
}
|
||||
}
|
||||
|
||||
private void removeBonusModifierModifiers()
|
||||
{
|
||||
Log.info("Removing bonus modifier modifiers");
|
||||
List<ItemModifier> mods = ModifyBuilder.instance.itemModifiers;
|
||||
for(ListIterator<ItemModifier> iter = mods.listIterator(); iter.hasNext();)
|
||||
{
|
||||
ItemModifier mod = iter.next();
|
||||
// flux mod
|
||||
if(mod instanceof ModExtraModifier) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void limitToolRepair()
|
||||
{
|
||||
|
||||
|
||||
Reference in new issue
Block a user