mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 08:17:52 +00:00
1 parent
0843cd0a64
commit
31a18e8e8f
14 files changed
+55
-68
No files matched your search
@@ -101,7 +101,6 @@ public class ModTweaker2 {
|
||||
public void serverStart(FMLServerStartingEvent event) {
|
||||
logger.info("Starting ServerStart for " + ModProps.modid);
|
||||
proxy.registerCommands();
|
||||
TweakerPlugin.hasInit = true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -25,13 +25,13 @@ import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
||||
public class Arcane {
|
||||
@ZenMethod
|
||||
public static void addShaped(String key, IItemStack output, String aspects, IIngredient[][] ingredients) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(new ShapedArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toShapedObjects(ingredients))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapeless(String key, IItemStack output, String aspects, IIngredient[] ingredients) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(new ShapelessArcaneRecipe(key, toStack(output), ThaumcraftHelper.parseAspects(aspects), toObjects(ingredients))));
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ public class Arcane {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ public class Aspects {
|
||||
/** Add/Remove/Set Aspects for items **/
|
||||
@ZenMethod
|
||||
public static void add(IItemStack stack, String aspects) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(toStack(stack), aspects, false));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void set(IItemStack stack, String aspects) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(toStack(stack), aspects, true));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class Aspects {
|
||||
|
||||
@ZenMethod
|
||||
public static void remove(IItemStack stack, String aspects) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(stack), aspects));
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class Aspects {
|
||||
MineTweakerAPI.getLogger().logError("No such entity " + entityName);
|
||||
return;
|
||||
}
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddEntity(entityName, aspects, false));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class Aspects {
|
||||
MineTweakerAPI.getLogger().logError("No such entity " + entityName);
|
||||
return;
|
||||
}
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddEntity(entityName, aspects, true));
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public class Aspects {
|
||||
MineTweakerAPI.getLogger().logError("No such entity " + entityName);
|
||||
return;
|
||||
}
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new RemoveEntity(entityName, aspects));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
public class Crucible {
|
||||
@ZenMethod
|
||||
public static void addRecipe(String key, IItemStack result, IIngredient catalyst, String aspects) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(new CrucibleRecipe(key, toStack(result), toObject(catalyst), ThaumcraftHelper.parseAspects(aspects))));
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Crucible {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
public class Infusion {
|
||||
@ZenMethod
|
||||
public static void addRecipe(String key, IItemStack input, IItemStack[] recipe, String aspects, IItemStack result, int instability) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(new InfusionRecipe(key, toStack(result), instability, ThaumcraftHelper.parseAspects(aspects), toStack(input), toStacks(recipe))));
|
||||
}
|
||||
|
||||
@@ -31,13 +31,13 @@ public class Infusion {
|
||||
// fuzzy or not
|
||||
@ZenMethod
|
||||
public static void addRecipe(String key, IItemStack input, IItemStack[] recipe, String aspects, IItemStack result, int instability, boolean fuzzyCentre, boolean[] fuzzyRecipe) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(new MTInfusionRecipe(key, toStack(result), instability, ThaumcraftHelper.parseAspects(aspects), toStack(input), toStacks(recipe), fuzzyCentre, fuzzyRecipe)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnchantment(String key, int enchantID, int instability, String aspects, IItemStack[] recipe) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddEnchant(new InfusionEnchantmentRecipe(key, Enchantment.enchantmentsList[enchantID], instability, ThaumcraftHelper.parseAspects(aspects), toStacks(recipe))));
|
||||
}
|
||||
|
||||
@@ -98,13 +98,13 @@ public class Infusion {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(output)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeEnchant(int id) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new RemoveEnchant(Enchantment.enchantmentsList[id]));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,170 +52,170 @@ public class Research {
|
||||
}
|
||||
|
||||
private static void addTab(String key, ResourceLocation icon, ResourceLocation background) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddTab(key, icon, background));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeTab(String tab) {
|
||||
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new RemoveTab(tab));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeResearch(String research) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new RemoveResearch(research));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void orphanResearch(String research) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new OrphanResearch(research));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addResearch(String key, String tab, @Optional String aspects, int x, int y, int difficulty, String domain, String path) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddResearch(new ResearchItem(key, tab, ThaumcraftHelper.parseAspects(aspects), x, y, difficulty, new ResourceLocation(domain, path))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addResearch(String key, String tab, @Optional String aspects, int x, int y, int difficulty, IItemStack item) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddResearch(new ResearchItem(key, tab, ThaumcraftHelper.parseAspects(aspects), x, y, difficulty, toStack(item))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addPage(String key, String unlocalized) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.TEXT, unlocalized));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addCraftingPage(String key, IItemStack item) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.NORMAL_CRAFTING, toStack(item)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addCruciblePage(String key, IItemStack item) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.CRUCIBLE_CRAFTING, toStack(item)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addArcanePage(String key, IItemStack item) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.ARCANE_CRAFTING, toStack(item)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addInfusionPage(String key, IItemStack item) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.INFUSION_CRAFTING, toStack(item)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnchantmentPage(String key, int i) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPage(key, PageType.INFUSION_ENCHANTMENT, Enchantment.enchantmentsList[i]));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void clearPages(String key) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new ClearPages(key));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addPrereq(String key, String req, @Optional boolean hidden) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddPrereq(key, req, hidden));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void clearPrereqs(String key) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new ClearPrereqs(key));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addSibling(String key, String sibling) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new AddSibling(key, sibling));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void clearSiblings(String key) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new ClearSiblings(key));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setRound(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.ROUND));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setSpikey(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.SPIKE));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setStub(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.STUB));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setSecondary(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.SECONDARY));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setVirtual(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.VIRTUAL));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setAutoUnlock(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.AUTO));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setConcealed(String key, boolean flag) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetResearch(key, flag, SetType.CONCEAL));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setAspects(String key, String aspects) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new SetAspects(key, ThaumcraftHelper.parseAspects(aspects)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void setComplexity(String key, int complexity) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Difficulty(key, complexity));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void refreshResearchRecipe(String key) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new RefreshResearch(key));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void moveResearch(String key, String destination, int x, int y) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new MoveResearch(key, destination, x, y));
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,11 @@ public class Warp {
|
||||
|
||||
@ZenMethod
|
||||
public static void addToResearch(String key, int warp) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new Add(key, warp));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addToItem(IItemStack stack, int warp) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new Add(toStack(stack), warp));
|
||||
}
|
||||
|
||||
@@ -86,31 +84,26 @@ public class Warp {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeFromResearch(String key) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new Remove(key));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeFromItem(IItemStack stack) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new Remove(toStack(stack)));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll() {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new MassRemove(RemoveType.BOTH));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllResearch() {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new MassRemove(RemoveType.RESEARCH));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAllItems() {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
MineTweakerAPI.apply(new MassRemove(RemoveType.ITEMS));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import cofh.thermalexpansion.util.crafting.CrucibleManager.RecipeCrucible;
|
||||
public class Crucible {
|
||||
@ZenMethod
|
||||
public static void addRecipe(int energy, IItemStack input, ILiquidStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(energy, toStack(input), toFluid(output)));
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Crucible {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input)));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import cofh.thermalexpansion.util.crafting.FurnaceManager.RecipeFurnace;
|
||||
public class Furnace {
|
||||
@ZenMethod
|
||||
public static void addRecipe(int energy, IItemStack input, IItemStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(energy, toStack(input), toStack(output)));
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Furnace {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input)));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ import cofh.thermalexpansion.util.crafting.PulverizerManager.RecipePulverizer;
|
||||
public class Pulverizer {
|
||||
@ZenMethod
|
||||
public static void addRecipe(int energy, IItemStack input, IItemStack output) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(energy, toStack(input), toStack(output), null, 0));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(int energy, IItemStack input, IItemStack output, IItemStack secondary, int secondaryChance) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(energy, toStack(input), toStack(output), toStack(secondary), secondaryChance));
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class Pulverizer {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input)));
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class Sawmill {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input)));
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Smelter {
|
||||
ItemStack out1 = toStack(output);
|
||||
ItemStack out2 = toStack(output2);
|
||||
RecipeSmelter recipe = (RecipeSmelter) ThermalHelper.getTERecipe(ThermalHelper.smelterRecipe, in1, in2, out1, out2, chance, energy);
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(in1, in2, recipe));
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class Smelter {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input, IItemStack input2) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input), toStack(input2)));
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Transposer {
|
||||
ItemStack out = toStack(output);
|
||||
FluidStack fluid = toFluid(liquid);
|
||||
RecipeTransposer recipe = (RecipeTransposer) ThermalHelper.getTERecipe(ThermalHelper.transposerRecipe, in, out, fluid, energy, chance);
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Add(in, fluid, recipe, isFillRecipe));
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class Transposer {
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack input, ILiquidStack liquid, boolean isFillRecipe) {
|
||||
if (!TweakerPlugin.hasInit())
|
||||
|
||||
MineTweakerAPI.apply(new Remove(toStack(input), toFluid(liquid), isFillRecipe));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import cpw.mods.fml.common.Loader;
|
||||
public class TweakerPlugin {
|
||||
private static ArrayList<String> isLoaded = new ArrayList();
|
||||
|
||||
public static boolean hasInit = false;
|
||||
|
||||
public static void register(String mod, Class clazz) {
|
||||
if (Loader.isModLoaded(mod)) {
|
||||
@@ -28,7 +27,4 @@ public class TweakerPlugin {
|
||||
return isLoaded.contains(string);
|
||||
}
|
||||
|
||||
public static boolean hasInit(){
|
||||
return hasInit;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user