Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add soul use recipe #759

Draft
wants to merge 4 commits into
base: 1.12
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ repositories {
url "https://www.ryanliptak.com/maven/"
}
maven {
url "https://maven.chaosfield.at/"
}
maven {
url "http://maven.ic2.player.to/"
url "https://maven.ellpeck.de/"
}
maven {
url "https://maven.tterrag.com"
Expand All @@ -56,49 +53,49 @@ repositories {
url = "https://maven.thiakil.com"
}
maven {
url "https://tehnut.info/maven/"
url "https://maven.amadornes.com/"
}
maven {
url "https://maven.amadornes.com/"
url "https://www.cursemaven.com"
}
}

dependencies {
deobfCompile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.554"
deobfCompile "mezz.jei:jei_1.12.2:4.14.4.264"
deobfCompile "com.blamejared:MTLib:3.0.4.8"
deobfCompile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.613"
deobfCompile "mezz.jei:jei_1.12.2:4.16.1.302"
deobfCompile "com.blamejared:MTLib:3.0.5.15"
deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
deobfCompile "vazkii.botania:Botania:r1.10-357.7"
deobfCompile "vazkii.botania:Botania:r1.10-363.148"


deobfCompile("cofh:ThermalExpansion:1.12.2-5.5.3.41:universal") {
deobfCompile("cofh:ThermalExpansion:1.12.2-5.5.4.43:universal") {
exclude group: 'mezz.jei'
}
deobfCompile("cofh:ThermalFoundation:1.12.2-2.6.2.25:universal") {
deobfCompile("cofh:ThermalFoundation:1.12.2-2.6.3.27:universal") {
exclude group: 'mezz.jei'
}

deobfCompile("cofh:CoFHCore:1.12.2-4.6.2.24:universal") {
deobfCompile("cofh:CoFHCore:1.12.2-4.6.3.27:universal") {
exclude group: 'mezz.jei'
}

deobfCompile("cofh:RedstoneFlux:1.12-2.1.0.6:universal") {
deobfCompile("cofh:RedstoneFlux:1.12-2.1.0.7:universal") {
exclude group: 'mezz.jei'
}

deobfCompile("cofh:CoFHWorld:1.12.2-1.3.0.6:universal") {
deobfCompile("cofh:CoFHWorld:1.12.2-1.3.1.7:universal") {
exclude group: 'mezz.jei'
}


deobfCompile("codechicken:CodeChickenLib:1.12.2-3.2.2.353:universal") {
deobfCompile("codechicken:CodeChickenLib:1.12.2-3.2.3.358:universal") {
exclude group: 'mezz.jei'
}

deobfCompile("betterwithmods:BetterWithMods:1.12-2.3.15-995") {
deobfCompile("betterwithmods:BetterWithMods:1.12-2.3.23-4") {
exclude group: 'mezz.jei'
}
deobfCompile("de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r142") {
deobfCompile("de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16") {
exclude group: 'mezz.jei'
}
deobfCompile("slimeknights.mantle:Mantle:1.12-1.3.3.+") {
Expand All @@ -107,20 +104,20 @@ dependencies {
deobfCompile("slimeknights:TConstruct:1.12.2-2.12.0.+") {
exclude group: 'mezz.jei'
}
deobfCompile('net.sengir.forestry:forestry_1.12.2:5.+') {
deobfCompile('curse.maven:forestry-59751:2918418') {
exclude group: 'mezz.jei'
}
deobfCompile "team.chisel.ctm:CTM:MC1.12.2-0.3.2.20"
deobfCompile "team.chisel.ctm:CTM:MC1.12.2-1.0.2.31"
deobfCompile("knightminer.tcomplement:TinkersComplement:1.12.2-0.4.2.39") {
exclude group: 'mezz.jei'
}
deobfCompile "team.chisel:Chisel:MC1.12.2-0.2.0.31"
deobfCompile "com.wayoftime.bloodmagic:BloodMagic:1.12.2-2.3.3-101"
deobfCompile "info.amerifrance.guideapi:Guide-API:1.12-2.1.7-62"
deobfCompile("knightminer:Inspirations:1.12.2-0.2.4.70") {
deobfCompile "team.chisel:Chisel:MC1.12.2-1.0.2.45"
deobfCompile "curse.maven:bloodmagic-224791:2610083"
deobfCompile "curse.maven:guideapi-228832:2645993"
deobfCompile("knightminer:Inspirations:1.12.2-0.2.9.9") {
exclude group: 'mezz.jei'
}
deobfCompile "blusunrize:ImmersiveEngineering:0.12-89-518"
deobfCompile "blusunrize:ImmersiveEngineering:0.12-92-559"
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
@ZenRegister
public class Compost {

@SuppressWarnings("deprecation")
@ZenMethod
public static void addRecipe(IItemStack output, IItemStack outputDisplay, IIngredient input, IItemStack inputDisplay) {
if(!InputHelper.isABlock(outputDisplay) || !InputHelper.isABlock(inputDisplay)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static Object[] toShapedAnvilObjects(IIngredient[][] ingredients) {
if(ingredients == null)
return null;
else {
ArrayList prep = new ArrayList();
ArrayList<Object> prep = new ArrayList<>();
char chr = 'a';
for(int y = 0; y < 4; y++) {
StringBuilder matrix = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.blamejared.compat.betterwithmods;

import betterwithmods.common.registry.BellowsManager;
import betterwithmods.module.hardcore.world.HCBuoy;
import betterwithmods.util.item.Stack;
import betterwithmods.util.item.StackMap;
import com.blamejared.ModTweaker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.bulk.manager.CraftingManagerBulk;
import betterwithmods.common.registry.bulk.recipes.CookingPotRecipe;
import com.blamejared.compat.betterwithmods.base.bulkrecipes.CookingPotBuilder;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
Expand All @@ -13,8 +11,6 @@
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.function.Supplier;

@ZenClass("mods.betterwithmods.Cauldron")
@ModOnly("betterwithmods")
@ZenRegister
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.bulk.manager.CraftingManagerBulk;
import betterwithmods.common.registry.bulk.recipes.CookingPotRecipe;
import com.blamejared.compat.betterwithmods.base.bulkrecipes.CookingPotBuilder;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
Expand All @@ -13,8 +11,6 @@
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.function.Supplier;

@ZenClass("mods.betterwithmods.Crucible")
@ModOnly("betterwithmods")
@ZenRegister
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static void addHeatSource(crafttweaker.api.block.IBlockState state, int h
CraftTweakerAPI.apply(new AddHeatSource(CraftTweakerMC.getBlockState(state), heat));
}

@SuppressWarnings("deprecation")
@ZenMethod
public static void addHeatSource(IItemStack stack, int heat) {
if (InputHelper.isABlock(stack)) {
Expand Down
42 changes: 41 additions & 1 deletion src/main/java/com/blamejared/compat/betterwithmods/Hopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.HopperFilter;
import betterwithmods.common.registry.HopperInteractions;
import betterwithmods.module.gameplay.HopperRecipes;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAction;
Expand Down Expand Up @@ -49,6 +48,15 @@ public static void addFilterRecipe(String name, IIngredient input, IItemStack[]
Lists.newArrayList(CraftTweakerMC.getItemStacks(outputs)),
Lists.newArrayList(CraftTweakerMC.getItemStacks(secondary))));
}

@ZenMethod
public static void addSoulUseRecipe(String name, IIngredient input, int soulAmount, IItemStack[] outputs, IItemStack[] secondary) {
ModTweaker.LATE_ADDITIONS.add(new AddSoulUseRecipe(name,
CraftTweakerMC.getIngredient(input),
soulAmount,
Lists.newArrayList(CraftTweakerMC.getItemStacks(outputs)),
Lists.newArrayList(CraftTweakerMC.getItemStacks(secondary))));
}

@ZenMethod
public static void addSoulUrnRecipe(IIngredient input, IItemStack[] outputs, IItemStack[] secondary) {
Expand Down Expand Up @@ -185,6 +193,38 @@ public void apply() {
HopperInteractions.addHopperRecipe(new HopperInteractions.HopperRecipe(filterName,input,outputs,secondary));
}
}

public static class AddSoulUseRecipe extends BaseAction {
String filterName;
Ingredient input;
int soulAmount;
List<ItemStack> outputs;
List<ItemStack> secondary;

public AddSoulUseRecipe(String filterName, Ingredient input, int soulAmount, List<ItemStack> outputs, List<ItemStack> secondary) {
super("Filtered Hopper");
this.filterName = filterName;
this.input = input;
this.soulAmount = soulAmount;
this.outputs = outputs;
this.secondary = secondary;
}

@Override
protected String getRecipeInfo() {
return String.format("%s -> %s,%s in %s with %s souls",
Arrays.toString(input.getMatchingStacks()),
outputs.stream().map(ItemStack::getDisplayName).collect(Collectors.joining(",")),
secondary.stream().map(ItemStack::getDisplayName).collect(Collectors.joining(",")),
filterName,
String.valueOf(soulAmount));
}

@Override
public void apply() {
HopperInteractions.addHopperRecipe(new HopperInteractions.SoulUseRecipe(filterName,input,soulAmount,outputs,secondary));
}
}

public static class AddSoulUrnRecipe extends BaseAction {
Ingredient input;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/blamejared/compat/betterwithmods/Kiln.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
import betterwithmods.common.BWMRecipes;
import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.KilnStructureManager;
import betterwithmods.common.registry.block.managers.CraftingManagerBlock;
import betterwithmods.common.registry.block.recipe.KilnRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.compat.betterwithmods.base.blockrecipes.KilnBuilder;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAction;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
Expand All @@ -20,7 +17,6 @@
import stanhebben.zenscript.annotations.ZenMethod;

import javax.annotation.Nonnull;
import java.util.function.Supplier;

@ZenClass("mods.betterwithmods.Kiln")
@ModOnly("betterwithmods")
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/blamejared/compat/betterwithmods/Mill.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.bulk.manager.CraftingManagerBulk;
import betterwithmods.common.registry.bulk.recipes.MillRecipe;
import com.blamejared.compat.betterwithmods.base.bulkrecipes.MillBuilder;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
Expand All @@ -13,8 +11,6 @@
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.function.Supplier;

@ZenClass("mods.betterwithmods.Mill")
@ModOnly("betterwithmods")
@ZenRegister
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/blamejared/compat/betterwithmods/Misc.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.blamejared.compat.betterwithmods;

import betterwithmods.common.registry.BellowsManager;
import betterwithmods.module.hardcore.crafting.HCFurnace;
import betterwithmods.util.item.Stack;
import betterwithmods.util.item.StackMap;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.utils.BaseMapAddition;
import com.google.common.collect.Maps;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.minecraft.CraftTweakerMC;
import crafttweaker.mc1120.CraftTweaker;
import net.minecraft.item.crafting.Ingredient;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@ZenRegister
public class Movement {

@SuppressWarnings("deprecation")
@ZenMethod
public static void set(IItemStack input, float speed) {
ItemStack stack = InputHelper.toStack(input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import betterwithmods.common.BWRegistry;
import com.blamejared.compat.betterwithmods.base.blockrecipes.SawBuilder;
import com.blamejared.mtlib.helpers.LogHelper;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import betterwithmods.common.BWMRecipes;
import betterwithmods.common.BWRegistry;
import com.blamejared.compat.betterwithmods.base.blockrecipes.TurntableBuilder;
import com.blamejared.mtlib.helpers.LogHelper;
import crafttweaker.annotations.ModOnly;
import crafttweaker.annotations.ZenRegister;
import crafttweaker.api.item.IIngredient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.blamejared.ModTweaker;
import com.blamejared.compat.betterwithmods.base.RemoveAll;
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.minecraft.CraftTweakerMC;
Expand Down Expand Up @@ -49,13 +48,13 @@ public void _buildRecipe(IIngredient input, IItemStack[] outputs) {
}

@ZenMethod
public BlockRecipeBuilder setInputBlockDrop(IItemStack input) {
public BlockRecipeBuilder<? extends BlockRecipe> setInputBlockDrop(IItemStack input) {
this.input = new BlockDropIngredient(CraftTweakerMC.getItemStack(input));
return this;
}

@ZenMethod
public BlockRecipeBuilder setInputBlockDrop(IItemStack[] inputs) {
public BlockRecipeBuilder<? extends BlockRecipe> setInputBlockDrop(IItemStack[] inputs) {
this.input = new BlockDropIngredient(CraftTweakerMC.getItemStacks(inputs));
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
import com.blamejared.mtlib.helpers.InputHelper;
import com.blamejared.mtlib.helpers.LogHelper;
import com.blamejared.mtlib.utils.BaseAction;
import com.google.common.collect.Lists;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;

import java.util.List;
import java.util.stream.Collectors;

public class BlockRecipeRemoveInput<T extends BlockRecipe> extends BaseAction {

private final ItemStack input;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.blamejared.compat.betterwithmods.base.blockrecipes;

import betterwithmods.common.BWMRecipes;
import betterwithmods.common.BWRegistry;
import betterwithmods.common.registry.block.managers.CraftingManagerBlock;
import betterwithmods.common.registry.block.recipe.BlockRecipe;
import betterwithmods.common.registry.block.recipe.TurntableRecipe;
import com.blamejared.ModTweaker;
import com.blamejared.mtlib.helpers.InputHelper;
Expand All @@ -13,10 +11,8 @@
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.minecraft.CraftTweakerMC;
import net.minecraft.block.Block;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.function.Supplier;
Expand All @@ -35,6 +31,7 @@ public TurntableBuilder setRotations(int rotations) {
return this;
}

@SuppressWarnings("deprecation")
@ZenMethod
public TurntableBuilder setProductState(IItemStack productState) {
if (InputHelper.isABlock(productState)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import betterwithmods.common.registry.bulk.recipes.MillRecipe;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import stanhebben.zenscript.annotations.ZenMethod;

import java.util.function.Supplier;
Expand Down
Loading