This closes #17 and closes #58, I tested and it worked using the script given

Also changes like all packages
inb4 "jared changes a package name in ModTweaker2 breaking compatability
with everything" drama tweet.
This commit is contained in:
jaredlll08 committed 2015-02-20 23:57:32 +02:00
1 parent 4fd2551072
commit ec562b62ea
187 files changed
+977 -991

No files matched your search

@@ -0,0 +1,40 @@
package modtweaker2.mods.tconstruct.handlers;
import java.util.List;
import minetweaker.MineTweakerAPI;
import modtweaker2.mods.tconstruct.TConstructHelper;
import modtweaker2.util.BaseListRemoval;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import tconstruct.library.modifier.ItemModifier;
@ZenClass("mods.tconstruct.Modifiers")
public class Modifiers {
@ZenMethod
public static void remove(String mod) {
MineTweakerAPI.apply(new Remove(mod));
}
//Searches through the modifiers and removes the first valid entry
private static class Remove extends BaseListRemoval {
private final String check;
public Remove(String check) {
super("Modifier", TConstructHelper.modifiers);
this.check = check;
}
@Override
public void apply() {
for (ItemModifier m : (List<ItemModifier>) list) {
if (m.key.equals(check)) {
recipe = m;
break;
}
}
list.remove(recipe);
}
}
}