Merge pull request #702 from TagnumElite/actadd-ingredient
Improve ActuallyAdditions support
This commit is contained in:
commit
a1c0cccf46
5 changed files with 16 additions and 10 deletions
|
@ -4,7 +4,9 @@ import com.blamejared.ModTweaker;
|
|||
import com.blamejared.mtlib.helpers.*;
|
||||
import com.blamejared.mtlib.utils.*;
|
||||
import crafttweaker.annotations.*;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import stanhebben.zenscript.annotations.*;
|
||||
|
@ -17,8 +19,8 @@ import java.util.*;
|
|||
public class AtomicReconstructor {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack input, int energyUsed) {
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new LensConversionRecipe(InputHelper.toStack(input), InputHelper.toStack(output), energyUsed, ActuallyAdditionsAPI.lensDefaultConversion))));
|
||||
public static void addRecipe(IItemStack output, IIngredient input, int energyUsed) {
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new LensConversionRecipe(CraftTweakerMC.getIngredient(input), InputHelper.toStack(output), energyUsed, ActuallyAdditionsAPI.lensDefaultConversion))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
|
|
@ -8,7 +8,9 @@ import com.blamejared.mtlib.utils.BaseListRemoval;
|
|||
import crafttweaker.CraftTweakerAPI;
|
||||
import crafttweaker.annotations.ModOnly;
|
||||
import crafttweaker.annotations.ZenRegister;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -24,12 +26,12 @@ import java.util.List;
|
|||
public class Compost {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack outputDisplay, IItemStack input, IItemStack inputDisplay) {
|
||||
public static void addRecipe(IItemStack output, IItemStack outputDisplay, IIngredient input, IItemStack inputDisplay) {
|
||||
if(!InputHelper.isABlock(outputDisplay) || !InputHelper.isABlock(inputDisplay)) {
|
||||
CraftTweakerAPI.logError("outputDisplay or InputDisplay is not a block!");
|
||||
return;
|
||||
}
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new CompostRecipe(InputHelper.toStack(input), Block.getBlockFromItem(InputHelper.toStack(inputDisplay).getItem()), InputHelper.toStack(output), Block.getBlockFromItem(InputHelper.toStack(outputDisplay).getItem())))));
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new CompostRecipe(CraftTweakerMC.getIngredient(input), Block.getBlockFromItem(InputHelper.toStack(inputDisplay).getItem()).getDefaultState(), InputHelper.toStack(output), Block.getBlockFromItem(InputHelper.toStack(outputDisplay).getItem()).getDefaultState()))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
|
|
@ -4,7 +4,9 @@ import com.blamejared.ModTweaker;
|
|||
import com.blamejared.mtlib.helpers.*;
|
||||
import com.blamejared.mtlib.utils.*;
|
||||
import crafttweaker.annotations.*;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
|
@ -18,8 +20,8 @@ import java.util.*;
|
|||
public class Crusher {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack input, @Optional IItemStack outputSecondary, @Optional int outputSecondaryChance) {
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new CrusherRecipe(InputHelper.toStack(input), InputHelper.toStack(output), InputHelper.toStack(outputSecondary), outputSecondaryChance))));
|
||||
public static void addRecipe(IItemStack output, IIngredient input, @Optional IItemStack outputSecondary, @Optional int outputSecondaryChance) {
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new CrusherRecipe(CraftTweakerMC.getIngredient(input), InputHelper.toStack(output), InputHelper.toStack(outputSecondary), outputSecondaryChance))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
|
|
@ -4,7 +4,9 @@ import com.blamejared.ModTweaker;
|
|||
import com.blamejared.mtlib.helpers.*;
|
||||
import com.blamejared.mtlib.utils.*;
|
||||
import crafttweaker.annotations.*;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
|
@ -18,11 +20,11 @@ import java.util.*;
|
|||
public class Empowerer {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IItemStack input, IItemStack modifier1, IItemStack modifier2, IItemStack modifier3, IItemStack modifier4, int energyPerStand, int time, @Optional float[] particleColourArray) {
|
||||
public static void addRecipe(IItemStack output, IIngredient input, IIngredient modifier1, IIngredient modifier2, IIngredient modifier3, IIngredient modifier4, int energyPerStand, int time, @Optional float[] particleColourArray) {
|
||||
if(particleColourArray == null || particleColourArray.length == 0) {
|
||||
particleColourArray = new float[]{0, 0, 0};
|
||||
}
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new EmpowererRecipe(InputHelper.toStack(input), InputHelper.toStack(output), InputHelper.toStack(modifier1), InputHelper.toStack(modifier2), InputHelper.toStack(modifier3), InputHelper.toStack(modifier4), energyPerStand, time, particleColourArray))));
|
||||
ModTweaker.LATE_ADDITIONS.add(new Add(Collections.singletonList(new EmpowererRecipe(CraftTweakerMC.getIngredient(input), InputHelper.toStack(output), CraftTweakerMC.getIngredient(modifier1), CraftTweakerMC.getIngredient(modifier2), CraftTweakerMC.getIngredient(modifier3), CraftTweakerMC.getIngredient(modifier4), energyPerStand, time, particleColourArray))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package com.blamejared.compat.actuallyaddition;
|
||||
|
||||
import com.blamejared.ModTweaker;
|
||||
import com.blamejared.mtlib.helpers.*;
|
||||
import com.blamejared.mtlib.utils.*;
|
||||
import crafttweaker.annotations.*;
|
||||
import crafttweaker.api.item.IItemStack;
|
||||
import crafttweaker.api.liquid.ILiquidStack;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.*;
|
||||
|
|
Loading…
Reference in a new issue