QED support, updated some mods
This commit is contained in:
parent
28b835e733
commit
91498597cc
12 changed files with 89 additions and 1 deletions
|
@ -1,3 +1,3 @@
|
|||
mc_version=1.7.10
|
||||
forge_version=10.13.2.1291
|
||||
forge_version=10.13.4.1492-1.7.10
|
||||
mod_version=0.3.0
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
libs/ForgeMultipart-1.7.10-1.2.0.345-dev.jar
Normal file
BIN
libs/ForgeMultipart-1.7.10-1.2.0.345-dev.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/extrautilities-1.2.10-deobf.jar
Normal file
BIN
libs/extrautilities-1.2.10-deobf.jar
Normal file
Binary file not shown.
|
@ -12,6 +12,7 @@ import modtweaker2.mods.botania.Botania;
|
|||
import modtweaker2.mods.chisel.Chisel;
|
||||
import modtweaker2.mods.exnihilo.ExNihilo;
|
||||
import modtweaker2.mods.extendedworkbench.ExtendedWorkbench;
|
||||
import modtweaker2.mods.extraUtils.ExtraUtils;
|
||||
import modtweaker2.mods.factorization.Factorization;
|
||||
import modtweaker2.mods.forestry.Forestry;
|
||||
import modtweaker2.mods.fsp.Steamcraft;
|
||||
|
@ -84,6 +85,8 @@ public class ModTweaker2 {
|
|||
TweakerPlugin.register("Forestry", Forestry.class);
|
||||
TweakerPlugin.register("chisel", Chisel.class);
|
||||
TweakerPlugin.register("aura", AuraCascade.class);
|
||||
TweakerPlugin.register("ExtraUtilities", ExtraUtils.class);
|
||||
|
||||
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
MinecraftForge.EVENT_BUS.register(new ClientEvents());
|
||||
|
|
12
src/main/java/modtweaker2/mods/extraUtils/ExtraUtils.java
Normal file
12
src/main/java/modtweaker2/mods/extraUtils/ExtraUtils.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package modtweaker2.mods.extraUtils;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import modtweaker2.mods.appeng.handlers.Grind;
|
||||
import modtweaker2.mods.extraUtils.handlers.QED;
|
||||
|
||||
public class ExtraUtils {
|
||||
|
||||
public ExtraUtils() {
|
||||
MineTweakerAPI.registerClass(QED.class);
|
||||
}
|
||||
}
|
73
src/main/java/modtweaker2/mods/extraUtils/handlers/QED.java
Normal file
73
src/main/java/modtweaker2/mods/extraUtils/handlers/QED.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package modtweaker2.mods.extraUtils.handlers;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import modtweaker2.helpers.InputHelper;
|
||||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.utils.BaseListAddition;
|
||||
import modtweaker2.utils.BaseListRemoval;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import com.rwtema.extrautils.tileentity.enderconstructor.EnderConstructorRecipesHandler;
|
||||
|
||||
@ZenClass("mods.extraUtils.QED")
|
||||
public class QED {
|
||||
|
||||
@ZenMethod
|
||||
public static void addShapedRecipe(IItemStack output, IItemStack[][] recipe) {
|
||||
MineTweakerAPI.apply(new Add(new ShapedOreRecipe(InputHelper.toStack(output), InputHelper.toShapedObjects(recipe))));
|
||||
}
|
||||
|
||||
private static class Add extends BaseListAddition<IRecipe> {
|
||||
|
||||
public Add(IRecipe recipe) {
|
||||
super("QED", EnderConstructorRecipesHandler.recipes);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(IRecipe recipe) {
|
||||
return recipe.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack toRemove) {
|
||||
if (toRemove == null) {
|
||||
LogHelper.logError(String.format("Required parameters missing for %s Recipe.", "QED"));
|
||||
return;
|
||||
}
|
||||
LinkedList<IRecipe> recipes = new LinkedList<IRecipe>();
|
||||
|
||||
for (IRecipe recipe : EnderConstructorRecipesHandler.recipes) {
|
||||
if (recipe != null && recipe.getRecipeOutput() != null && recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(toRemove))) {
|
||||
recipes.add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
MineTweakerAPI.apply(new Remove(recipes));
|
||||
|
||||
}
|
||||
|
||||
public static class Remove extends BaseListRemoval<IRecipe> {
|
||||
|
||||
protected Remove(LinkedList<IRecipe> stacks) {
|
||||
super("QED", EnderConstructorRecipesHandler.recipes, stacks);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRecipeInfo(IRecipe recipe) {
|
||||
return recipe.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue