Added Extra Utils and Forestry support back (#527)

* Added TiC melting

* updated mods and added extrautils2-1.12-1.6.1.jar

* Added ExtraUtils2 Support

* Optimized imports.

* partial forestry support

* finished forestry support

* deleted old reference files

* fixed a few requested things.

* changes to respect class moves to mtlib
This commit is contained in:
BloodWorkXGaming 2017-09-18 17:23:00 +02:00 committed by Jared
parent a797c65e91
commit f2b3a7193b
45 changed files with 1323 additions and 168 deletions

View file

@ -19,7 +19,7 @@ compileJava {
}
minecraft {
version = "1.12-14.21.1.2415"
version = "1.12.1-14.22.1.2480"
runDir = "run"
mappings = "snapshot_20170624"
useDepAts = true
@ -38,24 +38,29 @@ repositories {
maven {
url "http://chickenbones.net/maven/"
}
maven {
url "http://www.ryanliptak.com/maven/"
}
maven {
url "https://maven.chaosfield.at/"
}
maven {
url = "http://maven.ic2.player.to/"
}
}
dependencies {
deobfCompile "mezz.jei:jei_1.12:4.7.2.76"
deobfCompile "com.blamejared:MTLib:3.0.0.1"
deobfCompile "cofh:ThermalExpansion:1.12-5.3.3.15:deobf"
deobfCompile "mezz.jei:jei_1.12.1:4.7.+"
deobfCompile "com.blamejared:MTLib:3.0.+"
deobfCompile ("cofh:ThermalExpansion:1.12-5.3.+:deobf") {
exclude group: 'mezz.jei'
}
deobfCompile "betterwithmods:BetterWithMods:1.12-2.0.8-110"
deobfCompile "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12-r113"
deobfCompile "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.1-r+"
deobfCompile "slimeknights.mantle:Mantle:1.12-1.3.1.+"
deobfCompile "slimeknights:TConstruct:1.12-2.7.3.30"
deobfCompile 'net.sengir.forestry:forestry_1.12.1:5.+'
}
processResources {

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Sat Aug 26 16:46:42 EDT 2017
#Fri Sep 15 21:40:52 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

52
gradlew vendored
View file

@ -6,12 +6,30 @@
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

8
gradlew.bat vendored
View file

@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@ -46,7 +46,7 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

Binary file not shown.

View file

@ -1,15 +1,16 @@
package com.blamejared;
import com.blamejared.api.annotations.Handler;
import crafttweaker.*;
import crafttweaker.mc1120.commands.*;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import mezz.jei.JustEnoughItems;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.event.*;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.IAction;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import java.io.IOException;
import java.util.*;
import java.util.LinkedList;
import java.util.List;
import static com.blamejared.reference.Reference.*;

View file

@ -1,6 +1,9 @@
package com.blamejared.api.annotations;
import java.lang.annotation.*;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)

View file

@ -1,16 +1,20 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import crafttweaker.annotations.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.AtomicReconstructor")
@ModOnly("actuallyadditions")

View file

@ -1,16 +1,20 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import crafttweaker.annotations.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.BallOfFur")
@ModOnly("actuallyadditions")

View file

@ -1,18 +1,22 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
import net.minecraft.block.Block;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.Compost")
@ModOnly("actuallyadditions")

View file

@ -1,17 +1,21 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import crafttweaker.annotations.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.Crusher")
@ModOnly("actuallyadditions")

View file

@ -1,17 +1,21 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import crafttweaker.annotations.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.Empowerer")
@ModOnly("actuallyadditions")

View file

@ -1,16 +1,20 @@
package com.blamejared.compat.actuallyaddition;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.utils.*;
import crafttweaker.annotations.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListAddition;
import com.blamejared.mtlib.utils.BaseListRemoval;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.Collections;
import java.util.List;
@ZenClass("mods.actuallyadditions.TreasureChest")
@ModOnly("actuallyadditions")

View file

@ -5,11 +5,11 @@ import betterwithmods.common.registry.anvil.AnvilCraftingManager;
import betterwithmods.common.registry.anvil.ShapedAnvilRecipe;
import betterwithmods.common.registry.anvil.ShapelessAnvilRecipe;
import betterwithmods.module.gameplay.AnvilRecipes;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.crafting.IRecipe;
@ -18,9 +18,7 @@ import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@ZenClass("mods.betterwithmods.Anvil")

View file

@ -3,12 +3,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.module.hardcore.HCBuoy;
import betterwithmods.util.item.Stack;
import betterwithmods.util.item.StackMap;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.utils.BaseMapAddition;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

View file

@ -4,12 +4,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.bulk.manager.CauldronManager;
import betterwithmods.common.registry.bulk.recipes.CauldronRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BulkAdd;
import com.blamejared.compat.betterwithmods.util.BulkRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

View file

@ -4,12 +4,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.bulk.manager.CrucibleManager;
import betterwithmods.common.registry.bulk.recipes.CrucibleRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BulkAdd;
import com.blamejared.compat.betterwithmods.util.BulkRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

View file

@ -5,20 +5,18 @@ import betterwithmods.common.registry.KilnStructureManager;
import betterwithmods.common.registry.blockmeta.managers.KilnManager;
import betterwithmods.common.registry.blockmeta.recipe.KilnRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BMAdd;
import com.blamejared.compat.betterwithmods.util.BMRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import com.google.common.collect.Lists;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Mod;
import stanhebben.zenscript.annotations.NotNull;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

View file

@ -3,12 +3,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.bulk.manager.MillManager;
import betterwithmods.common.registry.bulk.recipes.MillRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BulkAdd;
import com.blamejared.compat.betterwithmods.util.BulkRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

View file

@ -4,13 +4,12 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.blockmeta.managers.SawManager;
import betterwithmods.common.registry.blockmeta.recipe.SawRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BMAdd;
import com.blamejared.compat.betterwithmods.util.BMRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import com.google.common.collect.Lists;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;

View file

@ -4,12 +4,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.bulk.manager.StokedCauldronManager;
import betterwithmods.common.registry.bulk.recipes.StokedCauldronRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BulkAdd;
import com.blamejared.compat.betterwithmods.util.BulkRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

View file

@ -4,12 +4,11 @@ package com.blamejared.compat.betterwithmods;
import betterwithmods.common.registry.bulk.manager.StokedCrucibleManager;
import betterwithmods.common.registry.bulk.recipes.StokedCrucibleRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BulkAdd;
import com.blamejared.compat.betterwithmods.util.BulkRemove;
import com.blamejared.mtlib.helpers.InputHelper;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

View file

@ -4,15 +4,13 @@ import betterwithmods.common.registry.blockmeta.managers.TurntableManager;
import betterwithmods.common.registry.blockmeta.recipe.TurntableRecipe;
import betterwithmods.module.compat.jei.category.TurntableRecipeCategory;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.compat.betterwithmods.util.BMAdd;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseListRemoval;
import com.blamejared.mtlib.utils.BaseUndoable;
import com.google.common.collect.Lists;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;

View file

@ -0,0 +1,100 @@
package com.blamejared.compat.extrautils2;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import com.rwtema.extrautils2.api.machine.IMachineRecipe;
import com.rwtema.extrautils2.api.machine.MachineSlotFluid;
import com.rwtema.extrautils2.api.machine.MachineSlotItem;
import com.rwtema.extrautils2.api.machine.XUMachineCrusher;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.tuple.Pair;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ZenClass("mods.extrautils2.Crusher")
@ModOnly("extrautils2")
@ZenRegister
public class Crusher {
@ZenMethod
public static void add(IItemStack output, IItemStack input, @Optional IItemStack secondaryOutput, @Optional float secondaryChance) {
ModTweaker.LATE_ADDITIONS.add(new Add(InputHelper.toStack(output), InputHelper.toStack(input), InputHelper.toStack(secondaryOutput), secondaryChance));
}
@ZenMethod
public static void remove(IItemStack input) {
ModTweaker.LATE_REMOVALS.add(new Remove(InputHelper.toStack(input)));
}
private static class Add extends BaseUndoable {
private ItemStack output, input, secondaryOutput;
private float secondaryChance;
public Add(ItemStack output, ItemStack input, ItemStack secondaryOutput, float secondaryChance) {
super("Crusher");
this.output = output;
this.input = input;
this.secondaryOutput = secondaryOutput;
this.secondaryChance = secondaryChance;
if(!secondaryOutput.isEmpty() && secondaryChance <= 0) {
this.secondaryChance = 100;
}
}
@Override
public void apply() {
XUMachineCrusher.addRecipe(input, output, secondaryOutput, secondaryChance);
}
@Override
protected String getRecipeInfo() {
return LogHelper.getStackDescription(output);
}
}
private static class Remove extends BaseUndoable {
private ItemStack input;
public Remove(ItemStack input) {
super("Crusher");
this.input = input;
}
@Override
public void apply() {
List<IMachineRecipe> toRemove = new ArrayList<>();
for (IMachineRecipe recipe : XUMachineCrusher.INSTANCE.recipes_registry) {
for (Pair<Map<MachineSlotItem, List<ItemStack>>, Map<MachineSlotFluid, List<FluidStack>>> mapMapPair : recipe.getJEIInputItemExamples()) {
for (ItemStack stack : mapMapPair.getKey().get(XUMachineCrusher.INPUT)) {
if (input != null && input.isItemEqual(stack)) {
toRemove.add(recipe);
}
}
}
}
for (IMachineRecipe iMachineRecipe : toRemove) {
XUMachineCrusher.INSTANCE.recipes_registry.removeRecipe(iMachineRecipe);
}
}
@Override
protected String getRecipeInfo() {
return LogHelper.getStackDescription(input);
}
}
}

View file

@ -0,0 +1,82 @@
package com.blamejared.compat.extrautils2;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import com.rwtema.extrautils2.tile.TileResonator;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.extrautils2.Resonator")
@ModOnly("extrautils2")
@ZenRegister
public class Resonator {
/**
* Adds recipes to the resonator
* @param output output item
* @param input input item
* @param energy energy -> 1 GP are 100 here
* @param addOwnerTag (no idea)
*/
@ZenMethod
public static void add(IItemStack output, IItemStack input, int energy, @Optional boolean addOwnerTag) {
ModTweaker.LATE_ADDITIONS.add(new Add(InputHelper.toStack(output), InputHelper.toStack(input), energy, addOwnerTag));
}
@ZenMethod
public static void remove(IItemStack output) {
ModTweaker.LATE_REMOVALS.add(new Remove(InputHelper.toStack(output)));
}
private static class Add extends BaseUndoable {
private ItemStack output, input;
private int energy;
private boolean ownerTag;
public Add(ItemStack output, ItemStack input, int energy, boolean ownerTag) {
super("Resonator");
this.output = output;
this.input = input;
this.energy = energy;
this.ownerTag = ownerTag;
}
@Override
public void apply() {
TileResonator.register(input, output, energy, ownerTag);
}
@Override
protected String getRecipeInfo() {
return LogHelper.getStackDescription(output);
}
}
private static class Remove extends BaseUndoable {
private ItemStack output;
public Remove(ItemStack output) {
super("Resonator");
this.output = output;
}
@Override
public void apply() {
TileResonator.resonatorRecipes.removeIf(resonatorRecipe -> resonatorRecipe.output.equals(output));
}
@Override
protected String getRecipeInfo() {
return LogHelper.getStackDescription(output);
}
}
}

View file

@ -0,0 +1,118 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import forestry.api.recipes.ICarpenterRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.factory.recipes.CarpenterRecipe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.Arrays;
import static com.blamejared.mtlib.helpers.InputHelper.*;
@ZenClass("mods.forestry.Carpenter")
@ModOnly("forestry")
@ZenRegister
public class Carpenter {
public static final String name = "Forestry Carpenter";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds shaped recipe to Carpenter
*
* @param output recipe product
* @param ingredients required ingredients
* @param packagingTime amount of ticks per crafting operation
* * @param fluidInput required mB of fluid (optional)
* * @param box required box in top slot (optional)
*/
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient[][] ingredients, int packagingTime, @Optional ILiquidStack fluidInput, @Optional IItemStack box) {
ModTweaker.LATE_ADDITIONS.add(new Add(new CarpenterRecipe(packagingTime, toFluid(fluidInput), toStack(box), new ShapedRecipeCustom(toStack(output), toShapedObjects(ingredients)))));
}
private static IItemStack[][] transform(IItemStack[] arr, int N) {
int M = (arr.length + N - 1) / N;
IItemStack[][] mat = new IItemStack[M][];
int start = 0;
for(int r = 0; r < M; r++) {
int L = Math.min(N, arr.length - start);
mat[r] = Arrays.copyOfRange(arr, start, start + L);
start += L;
}
return mat;
}
private static class Add extends BaseAddForestry<ICarpenterRecipe> {
protected Add(ICarpenterRecipe recipe) {
super(Carpenter.name, RecipeManagers.carpenterManager, recipe);
}
@Override
protected String getRecipeInfo() {
return recipe.getBox().getDisplayName();
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes recipe from Carpenter
*
* @param output = recipe result
* * @param fluidInput = required type of fluid (optional)
*/
@ZenMethod
public static void removeRecipe(IItemStack output, @Optional ILiquidStack fluidInput) {
ModTweaker.LATE_REMOVALS.add(new Remove(output, fluidInput));
}
private static class Remove extends BaseRemoveForestry<ICarpenterRecipe> {
private ItemStack output;
private FluidStack fluidInput;
public Remove(IItemStack output, ILiquidStack fluidInput) {
super(Carpenter.name, RecipeManagers.carpenterManager);
this.output = InputHelper.toStack(output);
this.fluidInput = toFluid(fluidInput);
}
@Override
public boolean checkIsRecipe(ICarpenterRecipe recipe) {
if (recipe.getBox().isItemEqual(output)){
if (fluidInput == null){
return true;
}else {
if (fluidInput.isFluidEqual(recipe.getFluidResource())){
return true;
}
}
}
return false;
}
@Override
protected String getRecipeInfo() {
return output.getDisplayName();
}
}
}

View file

@ -0,0 +1,95 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.WeightedItemStack;
import forestry.api.recipes.ICentrifugeRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.CentrifugeRecipe;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.HashMap;
import java.util.Map;
import static com.blamejared.mtlib.helpers.InputHelper.toIItemStack;
import static com.blamejared.mtlib.helpers.InputHelper.toStack;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.Centrifuge")
@ModOnly("forestry")
@ZenRegister
public class Centrifuge {
public static final String name = "Forestry Centrifuge";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds recipe to Centrifuge
*
* @param output recipe product
* @param ingredients required ingredients
* @param packagingTime amount of ticks per crafting operation
*/
@ZenMethod
public static void addRecipe(WeightedItemStack[] output, IItemStack ingredients, int packagingTime) {
Map<ItemStack, Float> products = new HashMap<>();
for(WeightedItemStack product : output) {
products.put(toStack(product.getStack()), product.getChance());
}
ModTweaker.LATE_ADDITIONS.add(new Add(new CentrifugeRecipe(packagingTime, toStack(ingredients), products)));
}
private static class Add extends BaseAddForestry<ICentrifugeRecipe> {
public Add(ICentrifugeRecipe recipe) {
super(Centrifuge.name, RecipeManagers.centrifugeManager, recipe);
}
@Override
protected String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getInput());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes a recipe for the Centrifuge
*
* @param input type of item in input
*/
@ZenMethod
public static void removeRecipe(IIngredient input) {
ModTweaker.LATE_REMOVALS.add(new Remove(input));
}
private static class Remove extends BaseRemoveForestry<ICentrifugeRecipe> {
private IIngredient input;
public Remove(IIngredient input) {
super(Centrifuge.name, RecipeManagers.centrifugeManager);
this.input = input;
}
@Override
protected String getRecipeInfo() {
return input.toString();
}
@Override
public boolean checkIsRecipe(ICentrifugeRecipe recipe) {
return recipe != null && matches(input, toIItemStack(recipe.getInput()));
}
}
}

View file

@ -0,0 +1,167 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseMapAddition;
import com.blamejared.mtlib.utils.BaseMapRemoval;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import forestry.api.fuels.FermenterFuel;
import forestry.api.fuels.FuelManager;
import forestry.api.recipes.IFermenterRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.FermenterRecipe;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import static com.blamejared.mtlib.helpers.InputHelper.*;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.Fermenter")
@ModOnly("forestry")
@ZenRegister
public class Fermenter {
public static final String name = "Forestry Fermenter";
public static final String nameFuel = name + " (Fuel)";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds recipe to fermenter
* Amount of fluid output: fermentationValue * fluidOutputModifier
* Note: the actual consumption of fluid input depends on the fermentation fuel
*
* @param fluidOutput type of fluid produced
* @param resource organic item
* @param fluidInput type of fluid required in input
* @param fermentationValue amount of inputFluid on organic item requires
* @param fluidOutputModifier Output multiplier (this is usually a from the input fluid)
*/
@ZenMethod
public static void addRecipe(ILiquidStack fluidOutput, IItemStack resource, ILiquidStack fluidInput, int fermentationValue, float fluidOutputModifier) {
ModTweaker.LATE_ADDITIONS.add(new Add(new FermenterRecipe(toStack(resource), fermentationValue, fluidOutputModifier, getFluid(fluidOutput), toFluid(fluidInput))));
}
private static class Add extends BaseAddForestry<IFermenterRecipe> {
public Add(IFermenterRecipe recipe) {
super(Fermenter.name, RecipeManagers.fermenterManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getOutput());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes recipe from Fermenter
*
* @param input type of item in input
*/
@ZenMethod
public static void removeRecipe(IIngredient input) {
ModTweaker.LATE_REMOVALS.add(new Remove(input));
}
private static class Remove extends BaseRemoveForestry<IFermenterRecipe> {
private IIngredient input;
public Remove(IIngredient input) {
super(Fermenter.name, RecipeManagers.fermenterManager);
this.input = input;
}
@Override
protected String getRecipeInfo() {
return input.toString();
}
@Override
public boolean checkIsRecipe(IFermenterRecipe recipe) {
// check for input items
if(recipe != null && matches(input, toIItemStack(recipe.getResource()))) {
return true;
}
// check for input liquids
return recipe != null && matches(input, toILiquidStack(recipe.getFluidResource()));
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds fermenter fuel
* Note: the actual consumption of fluid input depends on the fermentation fuel
*
* @param item Item that is a valid fuel for the fermenter
* @param fermentPerCycle How much is fermented per work cycle, i.e. how much fluid of the input is consumed.
* @param burnDuration Amount of work cycles a single item of this fuel lasts before expiring.
*/
@ZenMethod
public static void addFuel(IItemStack item, int fermentPerCycle, int burnDuration) {
ModTweaker.LATE_ADDITIONS.add(new AddFuel(new FermenterFuel(toStack(item), fermentPerCycle, burnDuration)));
}
private static class AddFuel extends BaseMapAddition<ItemStack, FermenterFuel> {
public AddFuel(FermenterFuel fuelEntry) {
super(Fermenter.nameFuel, FuelManager.fermenterFuel);
recipes.put(fuelEntry.getItem(), fuelEntry);
}
@Override
public String getRecipeInfo(Entry<ItemStack, FermenterFuel> fuelEntry) {
return LogHelper.getStackDescription(fuelEntry.getKey());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes fermenter fuel
*
* @param fermenterItem Item that is a valid fuel for the fermenter
*/
@ZenMethod
public static void removeFuel(IIngredient fermenterItem) {
Map<ItemStack, FermenterFuel> fuelItems = new HashMap<>();
for(Entry<ItemStack, FermenterFuel> fuelItem : FuelManager.fermenterFuel.entrySet()) {
if(fuelItem != null && matches(fermenterItem, toIItemStack(fuelItem.getValue().getItem()))) {
fuelItems.put(fuelItem.getKey(), fuelItem.getValue());
}
}
if(!fuelItems.isEmpty()) {
ModTweaker.LATE_REMOVALS.add(new RemoveFuel(fuelItems));
} else {
LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Fermenter.name, fermenterItem.toString()));
}
}
private static class RemoveFuel extends BaseMapRemoval<ItemStack, FermenterFuel> {
public RemoveFuel(Map<ItemStack, FermenterFuel> recipes) {
super(Fermenter.nameFuel, FuelManager.fermenterFuel, recipes);
}
@Override
public String getRecipeInfo(Entry<ItemStack, FermenterFuel> fuelEntry) {
return LogHelper.getStackDescription(fuelEntry.getKey());
}
}
}

View file

@ -0,0 +1,159 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseMapAddition;
import com.blamejared.mtlib.utils.BaseMapRemoval;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.MoistenerFuel;
import forestry.api.recipes.IMoistenerRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.MoistenerRecipe;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import static com.blamejared.mtlib.helpers.InputHelper.toIItemStack;
import static com.blamejared.mtlib.helpers.InputHelper.toStack;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.Moistener")
@ModOnly("forestry")
@ZenRegister
public class Moistener {
public static final String name = "Forestry Moistener";
public static final String nameFuel = name + " (Fuel)";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds recipe to Moistener
*
* @param output recipe product
* @param input required item
* @param packagingTime amount of ticks per crafting operation
*/
@ZenMethod
public static void addRecipe(IItemStack output, IItemStack input, int packagingTime) {
ModTweaker.LATE_ADDITIONS.add(new Add(new MoistenerRecipe(toStack(input), toStack(output), packagingTime)));
}
private static class Add extends BaseAddForestry<IMoistenerRecipe> {
public Add(IMoistenerRecipe recipe) {
super(Moistener.name, RecipeManagers.moistenerManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getProduct());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes recipe from Fermenter
*
* @param output recipe product
*/
@ZenMethod
public static void removeRecipe(IIngredient output) {
ModTweaker.LATE_REMOVALS.add(new Remove(output));
}
private static class Remove extends BaseRemoveForestry<IMoistenerRecipe> {
private IIngredient output;
public Remove(IIngredient output) {
super(Moistener.name, RecipeManagers.moistenerManager);
this.output = output;
}
@Override
public String getRecipeInfo() {
return output.toString();
}
@Override
public boolean checkIsRecipe(IMoistenerRecipe recipe) {
return recipe != null && matches(output, toIItemStack(recipe.getProduct()));
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds Moistener fuel
*
* @param item The item to use
* @param product The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)
* @param moistenerValue How much this item contributes to the final product of the moistener (i.e. mycelium)
* @param stage What stage this product represents. Resources with lower stage value will be consumed first. (First Stage is 0)
*/
@ZenMethod
public static void addFuel(IItemStack item, IItemStack product, int moistenerValue, int stage) {
if(stage >= 0) {
ModTweaker.LATE_ADDITIONS.add(new AddFuel(new MoistenerFuel(toStack(item), toStack(product), moistenerValue, stage)));
} else {
LogHelper.logWarning(String.format("No %s Recipe add for %s. Stage parameter must positive!", Moistener.name, item.toString()));
}
}
private static class AddFuel extends BaseMapAddition<ItemStack, MoistenerFuel> {
public AddFuel(MoistenerFuel fuelEntry) {
super(Moistener.nameFuel, FuelManager.moistenerResource);
recipes.put(fuelEntry.getItem(), fuelEntry);
}
@Override
public String getRecipeInfo(Entry<ItemStack, MoistenerFuel> fuelEntry) {
return LogHelper.getStackDescription(fuelEntry.getKey());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes Moistener fuel.
*
* @param moistenerItem Item that is a valid fuel for the moistener
*/
@ZenMethod
public static void removeFuel(IIngredient moistenerItem) {
Map<ItemStack, MoistenerFuel> fuelItems = new HashMap<ItemStack, MoistenerFuel>();
for(Entry<ItemStack, MoistenerFuel> fuelItem : FuelManager.moistenerResource.entrySet()) {
if(fuelItem != null && matches(moistenerItem, toIItemStack(fuelItem.getValue().getItem()))) {
fuelItems.put(fuelItem.getKey(), fuelItem.getValue());
}
}
if(!fuelItems.isEmpty()) {
ModTweaker.LATE_REMOVALS.add(new RemoveFuel(fuelItems));
} else {
LogHelper.logWarning(String.format("No %s Recipe found for %s. Command ignored!", Moistener.name, moistenerItem.toString()));
}
}
private static class RemoveFuel extends BaseMapRemoval<ItemStack, MoistenerFuel> {
public RemoveFuel(Map<ItemStack, MoistenerFuel> recipes) {
super(Moistener.nameFuel, FuelManager.moistenerResource, recipes);
}
@Override
public String getRecipeInfo(Entry<ItemStack, MoistenerFuel> fuelEntry) {
return LogHelper.getStackDescription(fuelEntry.getKey());
}
}
}

View file

@ -0,0 +1,117 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.WeightedItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import crafttweaker.mc1120.item.MCItemStack;
import forestry.api.recipes.ISqueezerRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.SqueezerRecipe;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import static com.blamejared.mtlib.helpers.InputHelper.*;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.Squeezer")
@ModOnly("forestry")
@ZenRegister
public class Squeezer {
public static final String name = "Forestry Squeezer";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds recipe to Squeezer
*
* @param fluidOutput recipe fluid amount
* @param ingredients recipe ingredients
* @param timePerItem time per crafting operation
* * @param itemOutput recipe output (optional)
*/
@ZenMethod
public static void addRecipe(ILiquidStack fluidOutput, IItemStack[] ingredients, int timePerItem, @Optional WeightedItemStack itemOutput) {
if(itemOutput == null) {
itemOutput = new WeightedItemStack(new MCItemStack(ItemStack.EMPTY), 0);
}
ModTweaker.LATE_ADDITIONS.add(new Add(new SqueezerRecipe(timePerItem, toNonNullList(toStacks(ingredients)), toFluid(fluidOutput), toStack(itemOutput.getStack()), itemOutput.getChance())));
}
private static class Add extends BaseAddForestry<ISqueezerRecipe> {
public Add(ISqueezerRecipe recipe) {
super(Squeezer.name, RecipeManagers.squeezerManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getFluidOutput());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes a recipe for the Centrifuge
*
* @param liquid liquid output
* * @param ingredients list of ingredients (optional)
*/
@ZenMethod
public static void removeRecipe(IIngredient liquid, @Optional IIngredient[] ingredients) {
ModTweaker.LATE_REMOVALS.add(new Remove(liquid, ingredients));
}
private static class Remove extends BaseRemoveForestry<ISqueezerRecipe> {
private final IIngredient liquid;
private final IIngredient[] ingredients;
public Remove(IIngredient liquid, IIngredient[] ingredients) {
super(Squeezer.name, RecipeManagers.squeezerManager);
this.liquid = liquid;
this.ingredients = ingredients;
}
@Override
public String getRecipeInfo() {
return liquid.toString();
}
@Override
public boolean checkIsRecipe(ISqueezerRecipe recipe) {
// optional check for ingredients
if(ingredients != null) {
boolean matched = false;
for(int i = 0; i < ingredients.length; i++) {
if(matches(ingredients[i], toIItemStack(recipe.getResources().get(i))))
matched = true;
else {
matched = false;
// if one ingredients doesn't match abort all further checks
break;
}
}
// if some ingredient doesn't match, the last one is false
if(matched)
return true;
} else {
return true;
}
return false;
}
}
}

View file

@ -0,0 +1,97 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.liquid.ILiquidStack;
import forestry.api.recipes.IStillRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.factory.recipes.StillRecipe;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import static com.blamejared.mtlib.helpers.InputHelper.toFluid;
import static com.blamejared.mtlib.helpers.InputHelper.toILiquidStack;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.Still")
@ModOnly("forestry")
@ZenRegister
public class Still {
public static final String name = "Forestry Still";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds recipe to Still
*
* @param fluidOutput recipe fluid amount
* @param fluidInput recipe fluid input
* @param timePerUnit time per crafting operation
*/
@ZenMethod
public static void addRecipe(ILiquidStack fluidOutput, ILiquidStack fluidInput, int timePerUnit) {
ModTweaker.LATE_ADDITIONS.add(new Add(new StillRecipe(timePerUnit, toFluid(fluidInput), toFluid(fluidOutput))));
}
private static class Add extends BaseAddForestry<IStillRecipe> {
public Add(IStillRecipe recipe) {
super("Forestry Still", RecipeManagers.stillManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getOutput());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes recipe from Still
*
* @param output = liquid output
* * @param fluidInput = liquid input (optional)
*/
@ZenMethod
public static void removeRecipe(IIngredient output, @Optional ILiquidStack fluidInput) {
ModTweaker.LATE_ADDITIONS.add(new Remove(output, fluidInput));
}
private static class Remove extends BaseRemoveForestry<IStillRecipe> {
private final IIngredient output;
private final ILiquidStack fluidInput;
public Remove(IIngredient output, ILiquidStack fluidInput) {
super(Still.name, RecipeManagers.stillManager);
this.output = output;
this.fluidInput = fluidInput;
}
@Override
public String getRecipeInfo() {
return fluidInput.toString() + " --> " + output.toString();
}
@Override
public boolean checkIsRecipe(IStillRecipe r) {
if(r != null && matches(output, toILiquidStack(r.getOutput()))) {
if(fluidInput != null) {
if(matches(fluidInput, toILiquidStack(r.getInput()))) {
return true;
}
} else
return true;
}
return false;
}
}
}

View file

@ -0,0 +1,171 @@
package com.blamejared.compat.forestry;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAddForestry;
import com.blamejared.mtlib.utils.BaseRemoveForestry;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import forestry.api.recipes.IFabricatorRecipe;
import forestry.api.recipes.IFabricatorSmeltingRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.factory.recipes.FabricatorRecipe;
import forestry.factory.recipes.FabricatorSmeltingRecipe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import static com.blamejared.mtlib.helpers.InputHelper.*;
import static com.blamejared.mtlib.helpers.StackHelper.matches;
@ZenClass("mods.forestry.ThermionicFabricator")
@ModOnly("forestry")
@ZenRegister
public class ThermionicFabricator {
public static final String nameSmelting = "Forestry Thermionic Fabricator (Smelting)";
public static final String nameCasting = "Forestry Thermionic Fabricator (Casting)";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds smelting recipe to Thermionic Fabricator
*
* @param fluidOutput recipe fluid amount
* @param itemInput recipe input input
* @param meltingPoint point at where itemInput melts down
*/
@ZenMethod
public static void addSmelting(int fluidOutput, IItemStack itemInput, int meltingPoint) {
//The machines internal tank accept only liquid glass, therefor this function only accept the amount and hardcode the fluid to glass
FluidStack fluid = FluidRegistry.getFluidStack("glass", fluidOutput);
if (fluid == null){
LogHelper.logWarning("Liquid Glass is null for the Thermionic Fabricator");
return;
}
ModTweaker.LATE_ADDITIONS.add(new AddSmelting(new FabricatorSmeltingRecipe(toStack(itemInput), fluid, meltingPoint)));
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Adds casting recipe to Thermionic Fabricator
*
* @param output recipe output item
* @param ingredients list of input items
* @param fluidInput recipe fluid input
* * @param plan recipe plan item (optional)
* * @param remainingItems no idea(optional)
*/
@ZenMethod
public static void addCast(IItemStack output, IIngredient[][] ingredients, int fluidInput, @Optional IItemStack plan) {
FluidStack fluid = FluidRegistry.getFluidStack("glass", fluidInput);
if (fluid == null){
LogHelper.logWarning("Liquid Glass is null for the Thermionic Fabricator");
return;
}
ShapedRecipeCustom patternRecipe = new ShapedRecipeCustom(toStack(output), toShapedObjects(ingredients));
NonNullList<NonNullList<ItemStack>> ingredientsList = patternRecipe.getRawIngredients();
IFabricatorRecipe recipe = new FabricatorRecipe(toStack(plan), fluid, toStack(output), ingredientsList, patternRecipe.getOreDicts(), patternRecipe.getWidth(), patternRecipe.getHeight());
ModTweaker.LATE_ADDITIONS.add(new AddCast(recipe));
}
/*
Implements the actions to add a recipe
Since the machine has two crafting Steps, this is a constructors for both
*/
private static class AddSmelting extends BaseAddForestry<IFabricatorSmeltingRecipe> {
public AddSmelting(IFabricatorSmeltingRecipe recipe) {
super(ThermionicFabricator.nameSmelting, RecipeManagers.fabricatorSmeltingManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getResource());
}
}
private static class AddCast extends BaseAddForestry<IFabricatorRecipe> {
public AddCast(IFabricatorRecipe recipe) {
super(ThermionicFabricator.nameCasting, RecipeManagers.fabricatorManager, recipe);
}
@Override
public String getRecipeInfo() {
return LogHelper.getStackDescription(recipe.getRecipeOutput());
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Removes smelting recipe from Thermionic Fabricator
*
* @param itemInput = item input
*/
@ZenMethod
public static void removeSmelting(IIngredient itemInput) {
ModTweaker.LATE_REMOVALS.add(new RemoveSmelting(itemInput));
}
/**
* Removes casting recipe from Thermionic Fabricator
*
* @param product = recipe result
*/
@ZenMethod
public static void removeCast(IIngredient product) {
ModTweaker.LATE_REMOVALS.add(new RemoveCasts(product));
}
private static class RemoveSmelting extends BaseRemoveForestry<IFabricatorSmeltingRecipe> {
private IIngredient itemInput;
public RemoveSmelting(IIngredient itemInput) {
super(ThermionicFabricator.nameSmelting, RecipeManagers.fabricatorSmeltingManager);
this.itemInput = itemInput;
}
@Override
public String getRecipeInfo() {
return itemInput.toString();
}
@Override
public boolean checkIsRecipe(IFabricatorSmeltingRecipe recipe) {
return recipe != null && matches(itemInput, toIItemStack(recipe.getResource()));
}
}
private static class RemoveCasts extends BaseRemoveForestry<IFabricatorRecipe> {
private IIngredient product;
public RemoveCasts(IIngredient product) {
super(ThermionicFabricator.nameCasting, RecipeManagers.fabricatorManager);
this.product = product;
}
@Override
public String getRecipeInfo() {
return product.toString();
}
@Override
public boolean checkIsRecipe(IFabricatorRecipe recipe) {
return recipe != null && matches(product, toIItemStack(recipe.getRecipeOutput()));
}
}
}

View file

@ -1,21 +1,24 @@
package com.blamejared.compat.tconstruct;
import com.blamejared.ModTweaker;
import com.blamejared.compat.tconstruct.recipes.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.compat.tconstruct.recipes.AlloyRecipeTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.liquid.ILiquidStack;
import crafttweaker.mc1120.liquid.MCLiquidStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import slimeknights.tconstruct.library.TinkerRegistry;
import slimeknights.tconstruct.library.events.TinkerRegisterEvent;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.LinkedList;
import java.util.List;
@ZenClass("mods.tconstruct.Alloy")
@ZenRegister

View file

@ -1,11 +1,13 @@
package com.blamejared.compat.tconstruct;
import com.blamejared.ModTweaker;
import com.blamejared.compat.tconstruct.recipes.*;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.compat.tconstruct.recipes.CastingRecipeTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import net.minecraft.item.ItemStack;
@ -16,10 +18,12 @@ import slimeknights.mantle.util.RecipeMatch;
import slimeknights.tconstruct.library.TinkerRegistry;
import slimeknights.tconstruct.library.events.TinkerRegisterEvent;
import slimeknights.tconstruct.library.smeltery.CastingRecipe;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.LinkedList;
import java.util.List;
@ZenClass("mods.tconstruct.Casting")
@ZenRegister

View file

@ -2,20 +2,24 @@ package com.blamejared.compat.tconstruct;
import com.blamejared.ModTweaker;
import com.blamejared.compat.tconstruct.recipes.DryingRecipeTweaker;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import slimeknights.mantle.util.RecipeMatch;
import slimeknights.tconstruct.library.*;
import slimeknights.tconstruct.library.TinkerRegistry;
import slimeknights.tconstruct.library.events.TinkerRegisterEvent;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import java.util.*;
import java.util.LinkedList;
import java.util.List;
@ZenClass("mods.tconstruct.Drying")
@ZenRegister

View file

@ -1,7 +1,8 @@
package com.blamejared.compat.tconstruct.recipes;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import slimeknights.mantle.util.RecipeMatch;
import slimeknights.tconstruct.library.smeltery.CastingRecipe;

View file

@ -2,13 +2,15 @@ package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.CompactorManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Compactor")
@ModOnly("thermalexpansion")

View file

@ -1,16 +1,18 @@
package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.*;
import cofh.thermalexpansion.util.managers.machine.CrucibleManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Crucible")
@ModOnly("thermalexpansion")

View file

@ -1,15 +1,17 @@
package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.*;
import cofh.thermalexpansion.util.managers.machine.SmelterManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.parser.expression.ParsedExpression;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.InductionSmelter")
@ModOnly("thermalexpansion")

View file

@ -1,14 +1,17 @@
package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.*;
import cofh.thermalexpansion.util.managers.machine.InsolatorManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Insolator")
@ModOnly("thermalexpansion")

View file

@ -1,14 +1,17 @@
package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.*;
import cofh.thermalexpansion.util.managers.machine.PulverizerManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Pulverizer")
@ModOnly("thermalexpansion")

View file

@ -1,16 +1,18 @@
package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.*;
import cofh.thermalexpansion.util.managers.machine.RefineryManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Refinery")
@ModOnly("thermalexpansion")

View file

@ -2,13 +2,16 @@ package com.blamejared.compat.thermalexpansion;
import cofh.thermalexpansion.util.managers.machine.SawmillManager;
import com.blamejared.ModTweaker;
import com.blamejared.api.annotations.Handler;
import com.blamejared.mtlib.helpers.*;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseUndoable;
import crafttweaker.annotations.*;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.*;
import stanhebben.zenscript.annotations.Optional;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ZenClass("mods.thermalexpansion.Sawmill")
@ModOnly("thermalexpansion")