feat: add auracore compat
This commit is contained in:
parent
6de4ad874b
commit
49c9bdfe2c
|
@ -50,9 +50,13 @@ repositories {
|
|||
artifact()
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url = "https://maven.tilera.xyz"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "dev.tilera:auracore:1.2.0:deobf"
|
||||
implementation "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:api"
|
||||
}
|
||||
|
||||
|
|
12
changelog.md
12
changelog.md
|
@ -1,12 +0,0 @@
|
|||
### Current version: 4.0.20
|
||||
- [lets see how it likes gradle 2.14](https://github.com/jaredlll08/ModTweaker/commit/8ba1b84d2b977718f626d785dc4cf5883f646b40) - Colin Wong - Mon Jun 20 03:46:33 2022
|
||||
- [Enable debug flag](https://github.com/jaredlll08/ModTweaker/commit/966235271a6a130e7786811bf9ea8b86fd5a954f) - Colin Wong - Mon Jun 20 03:33:27 2022
|
||||
- [Update deps](https://github.com/jaredlll08/ModTweaker/commit/40b3bc146447ede73efc9decd006e3098f7e9981) - Colin Wong - Mon Jun 20 01:40:26 2022
|
||||
- [Print stacktrace](https://github.com/jaredlll08/ModTweaker/commit/6129abadfe8c354d19cccabc16e32e18a37e3d63) - Jared - Mon Jun 20 01:36:08 2022
|
||||
- [Return new mill builder with every .builder()](https://github.com/jaredlll08/ModTweaker/commit/af7808c35728b154f55c7e24f9a56ef37489f934) - Colin Wong - Mon Jun 20 01:18:49 2022
|
||||
- [Add TICMaterial methods for checking if stat exists (fixes #782)](https://github.com/jaredlll08/ModTweaker/commit/3fec35f97692dfe38a35998b4a3772082a0bd3b3) - Colin Wong - Tue Oct 12 05:16:15 2021
|
||||
- [don't try push to maven](https://github.com/jaredlll08/ModTweaker/commit/78021c0715d0b72aab862933ef7c62f55653aba2) - Jared - Tue Jun 29 13:18:50 2021
|
||||
- [fix build](https://github.com/jaredlll08/ModTweaker/commit/504119a3e807990193b7cb55da95620886c37e0f) - Jared - Tue Jun 29 13:12:35 2021
|
||||
- [auto curse push code](https://github.com/jaredlll08/ModTweaker/commit/77a1633529b9e2c9e9ffbc52fa83f785df419b2a) - Jared - Tue Jun 29 13:08:55 2021
|
||||
- [old version push](https://github.com/jaredlll08/ModTweaker/commit/521462c17027d124081bc5f923aff106d4c54f4f) - Jared - Tue Jun 29 12:49:16 2021
|
||||
- [Add support for pulley blocks (#781)](https://github.com/jaredlll08/ModTweaker/commit/0b5404c71101db84670e49d546c148e7d733994a) - Colin Wong - Wed Jun 23 18:34:06 2021
|
|
@ -8,6 +8,7 @@ import minetweaker.runtime.providers.ScriptProviderDirectory;
|
|||
import minetweaker.util.IEventHandler;
|
||||
import modtweaker2.mods.appeng.AppliedEnergistics;
|
||||
import modtweaker2.mods.auracascade.AuraCascade;
|
||||
import modtweaker2.mods.auracore.AuraCore;
|
||||
import modtweaker2.mods.botania.Botania;
|
||||
import modtweaker2.mods.botanicaladdons.BotanicalAddons;
|
||||
import modtweaker2.mods.chisel.Chisel;
|
||||
|
@ -82,6 +83,7 @@ public class ModTweaker2 {
|
|||
TweakerPlugin.register("aura", AuraCascade.class);
|
||||
TweakerPlugin.register("ExtraUtilities", ExtraUtils.class);
|
||||
TweakerPlugin.register("IC2", IC2C.class);
|
||||
TweakerPlugin.register("auracore", AuraCore.class);
|
||||
|
||||
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
|
|
13
src/main/java/modtweaker2/mods/auracore/AuraCore.java
Normal file
13
src/main/java/modtweaker2/mods/auracore/AuraCore.java
Normal file
|
@ -0,0 +1,13 @@
|
|||
package modtweaker2.mods.auracore;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import modtweaker2.mods.auracore.handlers.Crucible;
|
||||
import modtweaker2.utils.TweakerPlugin;
|
||||
|
||||
public class AuraCore extends TweakerPlugin {
|
||||
|
||||
public AuraCore() {
|
||||
MineTweakerAPI.registerClass(Crucible.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package modtweaker2.mods.auracore.handlers;
|
||||
|
||||
import static modtweaker2.helpers.InputHelper.toIItemStack;
|
||||
import static modtweaker2.helpers.InputHelper.toStack;
|
||||
import static modtweaker2.helpers.StackHelper.matches;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import dev.tilera.auracore.api.AuracoreRecipes;
|
||||
import dev.tilera.auracore.api.crafting.CrucibleRecipe;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.mods.thaumcraft.ThaumcraftHelper;
|
||||
import modtweaker2.utils.BaseListAddition;
|
||||
import modtweaker2.utils.BaseListRemoval;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
@ZenClass("mods.auracore.Crucible")
|
||||
public class Crucible {
|
||||
public static final String name = "Auracore Crucible";
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(String key, IItemStack result, int cost, String aspects) {
|
||||
MineTweakerAPI.apply(new Add(new CrucibleRecipe(key, toStack(result), ThaumcraftHelper.parseAspects(aspects), cost)));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition<CrucibleRecipe> {
|
||||
public Add(CrucibleRecipe recipe) {
|
||||
super(Crucible.name, AuracoreRecipes.getCrucibleRecipes());
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(CrucibleRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.recipeOutput);
|
||||
}
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IIngredient output) {
|
||||
List<CrucibleRecipe> recipes = new LinkedList<CrucibleRecipe>();
|
||||
|
||||
for (Object o : AuracoreRecipes.getCrucibleRecipes()) {
|
||||
if (o instanceof CrucibleRecipe) {
|
||||
CrucibleRecipe r = (CrucibleRecipe) o;
|
||||
if (r.recipeOutput != null && matches(output, toIItemStack(r.recipeOutput))) {
|
||||
recipes.add(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!recipes.isEmpty()) {
|
||||
MineTweakerAPI.apply(new Remove(recipes));
|
||||
} else {
|
||||
LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Crucible.name, output.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
private static class Remove extends BaseListRemoval<CrucibleRecipe> {
|
||||
public Remove(List<CrucibleRecipe> recipes) {
|
||||
super(Crucible.name, AuracoreRecipes.getCrucibleRecipes(), recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(CrucibleRecipe recipe) {
|
||||
return LogHelper.getStackDescription(recipe.recipeOutput);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue