Skip to content
Merged
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
85 changes: 80 additions & 5 deletions src/main/java/com/blamejared/compat/betterwithmods/Anvil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public static void addShaped(IItemStack output, IIngredient[][] inputs) {
ModTweaker.LATE_ADDITIONS.add(new AddShaped(output, inputs));
}

@ZenMethod
public static void addShapedFixed(IItemStack output, IIngredient[][] inputs) {
ModTweaker.LATE_ADDITIONS.add(new AddShapedFixed(output, inputs));
}

@ZenMethod
public static void addShapeless(IItemStack output, IIngredient[] inputs) {
ModTweaker.LATE_ADDITIONS.add(new AddShapeless(output, inputs));
Expand All @@ -41,6 +46,11 @@ public static void removeShaped(IItemStack output, @Optional IIngredient[][] ing
ModTweaker.LATE_REMOVALS.add(new RemoveShaped(output, ingredients));
}

@ZenMethod
public static void removeShapedFixed(IItemStack output, @Optional IIngredient[][] ingredients) {
ModTweaker.LATE_REMOVALS.add(new RemoveShapedFixed(output, ingredients));
}

@ZenMethod
public static void removeShapeless(IItemStack output, @Optional IIngredient[] ingredients) {
ModTweaker.LATE_REMOVALS.add(new RemoveShapeless(output, ingredients));
Expand All @@ -53,8 +63,8 @@ public static void removeAll() {

public static class AddShaped extends BaseAction {

private final IItemStack output;
private final IIngredient[][] ingredients;
protected final IItemStack output;
protected final IIngredient[][] ingredients;

public AddShaped(IItemStack output, IIngredient[][] ingredients) {
super("Add Anvil Shaped Recipe");
Expand All @@ -73,6 +83,18 @@ protected String getRecipeInfo() {
}
}

public static class AddShapedFixed extends AddShaped {

public AddShapedFixed(IItemStack output, IIngredient[][] ingredients) {
super(output, ingredients);
}

@Override
public void apply() {
AnvilRecipes.addSteelShapedRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), toShapedAnvilObjectsFixed(ingredients));
}
}

public static class AddShapeless extends BaseAction {

private final IItemStack output;
Expand All @@ -99,7 +121,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 All @@ -122,10 +144,37 @@ public static Object[] toShapedAnvilObjects(IIngredient[][] ingredients) {
}
}

public static Object[] toShapedAnvilObjectsFixed(IIngredient[][] ingredients) {
if(ingredients == null)
return null;
else {
ArrayList<Object> prep = new ArrayList<>();
char chr = 'a';
for(int x = 0; x < 4; x++) {
StringBuilder matrix = new StringBuilder();
for(int y = 0; y < 4; y++) {
if(x < ingredients.length && ingredients[x] != null && y < ingredients[x].length) {
if(ingredients[x][y] != null) {
prep.add(chr);
prep.add(InputHelper.toObject(ingredients[x][y]));
matrix.append(chr);
chr++;
} else {
matrix.append(' ');
}
}
}
if(matrix.length() > 0)
prep.add(x, matrix.toString());
}
return prep.toArray();
}
}

public static class RemoveShaped extends BaseAction {

private final IItemStack output;
private final IIngredient[][] ingredients;
protected final IItemStack output;
protected final IIngredient[][] ingredients;

protected RemoveShaped(IItemStack output, IIngredient[][] ingredients) {
super("Remove Shaped Anvil");
Expand Down Expand Up @@ -159,6 +208,32 @@ protected String getRecipeInfo() {
}
}

public static class RemoveShapedFixed extends RemoveShaped {

protected RemoveShapedFixed(IItemStack output, IIngredient[][] ingredients) {
super(output, ingredients);
}

@Override
public void apply() {
if(ingredients != null) {
IRecipe removal = new ShapedAnvilRecipe(new ResourceLocation("crafttweaker", this.name), InputHelper.toStack(output), toShapedAnvilObjectsFixed(ingredients));
for(Iterator<IRecipe> iterator = AnvilCraftingManager.ANVIL_CRAFTING.iterator(); iterator.hasNext(); ) {
IRecipe recipe = iterator.next();
if(recipe.getRecipeOutput().isItemEqual(removal.getRecipeOutput()) && removal.getIngredients().equals(recipe.getIngredients()))
iterator.remove();
}
} else {
for(Iterator<IRecipe> iterator = AnvilCraftingManager.ANVIL_CRAFTING.iterator(); iterator.hasNext(); ) {
IRecipe recipe = iterator.next();
if(recipe.getRecipeOutput().isItemEqual(InputHelper.toStack(output))) {
iterator.remove();
}
}
}
}
}

public static class RemoveShapeless extends BaseAction {

private final IItemStack output;
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
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
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
Loading