diff --git a/build.gradle b/build.gradle index 4c2c064f..2cad2b8f 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 30d399d8..d3b83982 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 82dec0ca..e3c20352 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew b/gradlew index 91a7e269..27309d92 100755 --- a/gradlew +++ b/gradlew @@ -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` diff --git a/gradlew.bat b/gradlew.bat index 8a0b282a..832fdb60 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -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 diff --git a/libs/CraftTweaker2-Dev-Full-1.12-4.0.5.jar b/libs/CraftTweaker2-Dev-Full-1.12-4.0.6.261.jar similarity index 84% rename from libs/CraftTweaker2-Dev-Full-1.12-4.0.5.jar rename to libs/CraftTweaker2-Dev-Full-1.12-4.0.6.261.jar index b460c7ed..957d9682 100644 Binary files a/libs/CraftTweaker2-Dev-Full-1.12-4.0.5.jar and b/libs/CraftTweaker2-Dev-Full-1.12-4.0.6.261.jar differ diff --git a/libs/extrautils2-1.12-1.6.1.jar b/libs/extrautils2-1.12-1.6.1.jar new file mode 100644 index 00000000..ddb4036d Binary files /dev/null and b/libs/extrautils2-1.12-1.6.1.jar differ diff --git a/src/main/java/com/blamejared/ModTweaker.java b/src/main/java/com/blamejared/ModTweaker.java index 055bd39b..0cc0c913 100644 --- a/src/main/java/com/blamejared/ModTweaker.java +++ b/src/main/java/com/blamejared/ModTweaker.java @@ -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.*; diff --git a/src/main/java/com/blamejared/api/annotations/Handler.java b/src/main/java/com/blamejared/api/annotations/Handler.java index bbd82647..8cf35f17 100644 --- a/src/main/java/com/blamejared/api/annotations/Handler.java +++ b/src/main/java/com/blamejared/api/annotations/Handler.java @@ -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) diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/AtomicReconstructor.java b/src/main/java/com/blamejared/compat/actuallyaddition/AtomicReconstructor.java index aa383a9d..53a3acf7 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/AtomicReconstructor.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/AtomicReconstructor.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/BallOfFur.java b/src/main/java/com/blamejared/compat/actuallyaddition/BallOfFur.java index 692323de..79b15fc2 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/BallOfFur.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/BallOfFur.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/Compost.java b/src/main/java/com/blamejared/compat/actuallyaddition/Compost.java index 2981b0c7..1c702713 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/Compost.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/Compost.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/Crusher.java b/src/main/java/com/blamejared/compat/actuallyaddition/Crusher.java index 54c82d57..1553f0c9 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/Crusher.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/Crusher.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/Empowerer.java b/src/main/java/com/blamejared/compat/actuallyaddition/Empowerer.java index 4120cc2a..460fe92d 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/Empowerer.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/Empowerer.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/actuallyaddition/TreasureChest.java b/src/main/java/com/blamejared/compat/actuallyaddition/TreasureChest.java index b286149d..201ab615 100644 --- a/src/main/java/com/blamejared/compat/actuallyaddition/TreasureChest.java +++ b/src/main/java/com/blamejared/compat/actuallyaddition/TreasureChest.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java b/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java index 3efd2e3a..f8763934 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Anvil.java @@ -5,11 +5,11 @@ 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.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") diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java b/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java index 6a738e80..a7100b9e 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Buoyancy.java @@ -3,12 +3,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java b/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java index 6d664ad2..c4d2b8f5 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Cauldron.java @@ -4,12 +4,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java b/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java index 8cd4819b..591cd40b 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Crucible.java @@ -4,12 +4,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java b/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java index 9a909e5b..b45b6554 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Kiln.java @@ -5,20 +5,18 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Mill.java b/src/main/java/com/blamejared/compat/betterwithmods/Mill.java index e93a5427..09d7cd63 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Mill.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Mill.java @@ -3,12 +3,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Saw.java b/src/main/java/com/blamejared/compat/betterwithmods/Saw.java index d53fbf21..77ae0f2b 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Saw.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Saw.java @@ -4,13 +4,12 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java b/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java index 765cbcb0..c08198f5 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/StokedCauldron.java @@ -4,12 +4,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java b/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java index b3f2bf70..fe786612 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/StokedCrucible.java @@ -4,12 +4,11 @@ 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; diff --git a/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java b/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java index 6cf310e3..b67d9939 100644 --- a/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java +++ b/src/main/java/com/blamejared/compat/betterwithmods/Turntable.java @@ -4,15 +4,13 @@ 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; diff --git a/src/main/java/com/blamejared/compat/extrautils2/Crusher.java b/src/main/java/com/blamejared/compat/extrautils2/Crusher.java new file mode 100644 index 00000000..45fef3e0 --- /dev/null +++ b/src/main/java/com/blamejared/compat/extrautils2/Crusher.java @@ -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 toRemove = new ArrayList<>(); + + for (IMachineRecipe recipe : XUMachineCrusher.INSTANCE.recipes_registry) { + for (Pair>, Map>> 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); + } + } + +} diff --git a/src/main/java/com/blamejared/compat/extrautils2/Resonator.java b/src/main/java/com/blamejared/compat/extrautils2/Resonator.java new file mode 100644 index 00000000..ce6beb53 --- /dev/null +++ b/src/main/java/com/blamejared/compat/extrautils2/Resonator.java @@ -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); + } + } + +} diff --git a/src/main/java/com/blamejared/compat/forestry/Carpenter.java b/src/main/java/com/blamejared/compat/forestry/Carpenter.java new file mode 100644 index 00000000..e54b9aac --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Carpenter.java @@ -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 { + + 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 { + + 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(); + } + } +} diff --git a/src/main/java/com/blamejared/compat/forestry/Centrifuge.java b/src/main/java/com/blamejared/compat/forestry/Centrifuge.java new file mode 100644 index 00000000..2a9c79da --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Centrifuge.java @@ -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 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 { + + 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 { + + 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())); + } + } +} diff --git a/src/main/java/com/blamejared/compat/forestry/Fermenter.java b/src/main/java/com/blamejared/compat/forestry/Fermenter.java new file mode 100644 index 00000000..17a5dce1 --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Fermenter.java @@ -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 { + 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 { + + 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 { + public AddFuel(FermenterFuel fuelEntry) { + super(Fermenter.nameFuel, FuelManager.fermenterFuel); + recipes.put(fuelEntry.getItem(), fuelEntry); + } + + @Override + public String getRecipeInfo(Entry 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 fuelItems = new HashMap<>(); + + for(Entry 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 { + public RemoveFuel(Map recipes) { + super(Fermenter.nameFuel, FuelManager.fermenterFuel, recipes); + } + + @Override + public String getRecipeInfo(Entry fuelEntry) { + return LogHelper.getStackDescription(fuelEntry.getKey()); + } + } +} + diff --git a/src/main/java/com/blamejared/compat/forestry/Moistener.java b/src/main/java/com/blamejared/compat/forestry/Moistener.java new file mode 100644 index 00000000..481b5a62 --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Moistener.java @@ -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 { + 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 { + 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 { + public AddFuel(MoistenerFuel fuelEntry) { + super(Moistener.nameFuel, FuelManager.moistenerResource); + recipes.put(fuelEntry.getItem(), fuelEntry); + } + + @Override + public String getRecipeInfo(Entry 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 fuelItems = new HashMap(); + + for(Entry 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 { + public RemoveFuel(Map recipes) { + super(Moistener.nameFuel, FuelManager.moistenerResource, recipes); + } + + @Override + public String getRecipeInfo(Entry fuelEntry) { + return LogHelper.getStackDescription(fuelEntry.getKey()); + } + } +} diff --git a/src/main/java/com/blamejared/compat/forestry/Squeezer.java b/src/main/java/com/blamejared/compat/forestry/Squeezer.java new file mode 100644 index 00000000..041f0c03 --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Squeezer.java @@ -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 { + + 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 { + + 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; + } + + } +} diff --git a/src/main/java/com/blamejared/compat/forestry/Still.java b/src/main/java/com/blamejared/compat/forestry/Still.java new file mode 100644 index 00000000..67cfb464 --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/Still.java @@ -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 { + + 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 { + + 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; + } + } +} diff --git a/src/main/java/com/blamejared/compat/forestry/ThermionicFabricator.java b/src/main/java/com/blamejared/compat/forestry/ThermionicFabricator.java new file mode 100644 index 00000000..6d315a22 --- /dev/null +++ b/src/main/java/com/blamejared/compat/forestry/ThermionicFabricator.java @@ -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> 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 { + + 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 { + + 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 { + + 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 { + + 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())); + } + } +} diff --git a/src/main/java/com/blamejared/compat/tconstruct/Alloy.java b/src/main/java/com/blamejared/compat/tconstruct/Alloy.java index 39c34e49..c783dbd8 100644 --- a/src/main/java/com/blamejared/compat/tconstruct/Alloy.java +++ b/src/main/java/com/blamejared/compat/tconstruct/Alloy.java @@ -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 diff --git a/src/main/java/com/blamejared/compat/tconstruct/Casting.java b/src/main/java/com/blamejared/compat/tconstruct/Casting.java index ed8c2739..81db5d06 100644 --- a/src/main/java/com/blamejared/compat/tconstruct/Casting.java +++ b/src/main/java/com/blamejared/compat/tconstruct/Casting.java @@ -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.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 diff --git a/src/main/java/com/blamejared/compat/tconstruct/Drying.java b/src/main/java/com/blamejared/compat/tconstruct/Drying.java index 21c92104..86c78eca 100644 --- a/src/main/java/com/blamejared/compat/tconstruct/Drying.java +++ b/src/main/java/com/blamejared/compat/tconstruct/Drying.java @@ -2,20 +2,24 @@ 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 diff --git a/src/main/java/com/blamejared/compat/tconstruct/recipes/CastingRecipeTweaker.java b/src/main/java/com/blamejared/compat/tconstruct/recipes/CastingRecipeTweaker.java index df5e1d6d..8f0d0dc2 100644 --- a/src/main/java/com/blamejared/compat/tconstruct/recipes/CastingRecipeTweaker.java +++ b/src/main/java/com/blamejared/compat/tconstruct/recipes/CastingRecipeTweaker.java @@ -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; diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/Compactor.java b/src/main/java/com/blamejared/compat/thermalexpansion/Compactor.java index 48b9b923..688a5284 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/Compactor.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/Compactor.java @@ -2,13 +2,15 @@ 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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/Crucible.java b/src/main/java/com/blamejared/compat/thermalexpansion/Crucible.java index 2545379c..a5e81d87 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/Crucible.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/Crucible.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/InductionSmelter.java b/src/main/java/com/blamejared/compat/thermalexpansion/InductionSmelter.java index bb3dbe82..fdb489a8 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/InductionSmelter.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/InductionSmelter.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/Insolator.java b/src/main/java/com/blamejared/compat/thermalexpansion/Insolator.java index 682fea0b..c9b120b2 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/Insolator.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/Insolator.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/Pulverizer.java b/src/main/java/com/blamejared/compat/thermalexpansion/Pulverizer.java index 56b5cf2f..73110351 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/Pulverizer.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/Pulverizer.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/Refinery.java b/src/main/java/com/blamejared/compat/thermalexpansion/Refinery.java index ddc84c91..c1e303f9 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/Refinery.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/Refinery.java @@ -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") diff --git a/src/main/java/com/blamejared/compat/thermalexpansion/SawMill.java b/src/main/java/com/blamejared/compat/thermalexpansion/SawMill.java index 53ba4f40..d96a4212 100644 --- a/src/main/java/com/blamejared/compat/thermalexpansion/SawMill.java +++ b/src/main/java/com/blamejared/compat/thermalexpansion/SawMill.java @@ -2,13 +2,16 @@ 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")