Update crafttweaker support

This commit is contained in:
modmuss50 2017-06-28 20:50:00 +01:00
parent c89aaaed7a
commit c0aab7f37a
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
18 changed files with 119 additions and 297 deletions

View file

@ -51,9 +51,9 @@ repositories {
name = "Amadornes"
url "http://maven.amadornes.com/"
}
ivy {
name "CraftTweaker"
artifactPattern "https://addons-origin.cursecdn.com/files/2392/421/[module]-[revision](-[classifier]).[ext]"
maven {
name "Jared"
url "http://maven.blamejared.com/"
}
maven {
url 'http://maven.epoxide.xyz'
@ -65,7 +65,6 @@ repositories {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
maven {
// HWYLA
name "TehNut"
@ -122,7 +121,7 @@ dependencies {
//deobfCompile "slimeknights:TConstruct:1.10.2-2.5.3.jenkins384"
//deobfCompile "slimeknights.mantle:Mantle:1.10.2-1.0.0.jenkins170"
deobfCompile "mcjty.theoneprobe:TheOneProbe:1.11-1.3.3-46"
compile "CraftTweaker:CraftTweaker:1.11.2-3.0.24"
compile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.0.0.5"
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.2-ex112'
compile name: 'buildcraft', version: '7.99.4', ext: 'jar'
}

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -52,12 +52,12 @@ public class CTAlloySmelter extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTAssemblingMachine extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTBlastFurnace extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTCentrifuge extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTChemicalReactor extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -52,12 +52,12 @@ public class CTCompressor extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,11 +24,11 @@
package techreborn.compat.crafttweaker;
import minetweaker.IUndoableAction;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.minecraft.MineTweakerMC;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.IAction;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.minecraft.CraftTweakerMC;
import net.minecraft.item.ItemStack;
import reborncore.common.util.ItemUtils;
import stanhebben.zenscript.annotations.ZenClass;
@ -45,20 +45,20 @@ public class CTFusionReactor {
@ZenMethod
public static void addRecipe(IIngredient topInput, IIngredient bottomInput, IItemStack output, int startEU, int euTick, int tickTime) {
FusionReactorRecipe reactorRecipe = new FusionReactorRecipe((ItemStack) CraftTweakerCompat.toObject(topInput), (ItemStack) CraftTweakerCompat.toObject(bottomInput), CraftTweakerCompat.toStack(output), startEU, euTick, tickTime);
MineTweakerAPI.apply(new Add(reactorRecipe));
CraftTweakerAPI.apply(new Add(reactorRecipe));
}
@ZenMethod
public static void removeTopInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveTopInput(iIngredient));
CraftTweakerAPI.apply(new RemoveTopInput(iIngredient));
}
@ZenMethod
public static void removeBottomInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveTopInput(iIngredient));
CraftTweakerAPI.apply(new RemoveTopInput(iIngredient));
}
private static class Add implements IUndoableAction {
private static class Add implements IAction {
private final FusionReactorRecipe recipe;
public Add(FusionReactorRecipe recipe) {
@ -70,38 +70,18 @@ public class CTFusionReactor {
FusionReactorRecipeHelper.registerRecipe(recipe);
}
@Override
public boolean canUndo() {
return true;
}
@Override
public void undo() {
FusionReactorRecipeHelper.reactorRecipes.remove(recipe);
}
@Override
public String describe() {
return "Adding Fusion Reactor recipe for " + recipe.getOutput().getDisplayName();
}
@Override
public String describeUndo() {
return "Removing Fusion Reactor recipe for " + recipe.getOutput().getDisplayName();
}
@Override
public Object getOverrideKey() {
return null;
}
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output)));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output)));
}
private static class Remove implements IUndoableAction {
private static class Remove implements IAction {
private final ItemStack output;
List<FusionReactorRecipe> removedRecipes = new ArrayList<FusionReactorRecipe>();
@ -121,40 +101,14 @@ public class CTFusionReactor {
}
}
@Override
public void undo() {
if (removedRecipes != null) {
for (FusionReactorRecipe recipe : removedRecipes) {
if (recipe != null) {
FusionReactorRecipeHelper.registerRecipe(recipe);
}
}
}
}
@Override
public String describe() {
return "Removing Fusion Reactor recipe for " + output.getDisplayName();
}
@Override
public String describeUndo() {
return "Re-Adding Fusion Reactor recipe for " + output.getDisplayName();
}
@Override
public Object getOverrideKey() {
return null;
}
@Override
public boolean canUndo() {
return true;
}
}
private static class RemoveTopInput implements IUndoableAction {
private static class RemoveTopInput implements IAction {
private final IIngredient output;
List<FusionReactorRecipe> removedRecipes = new ArrayList<FusionReactorRecipe>();
@ -165,7 +119,7 @@ public class CTFusionReactor {
@Override
public void apply() {
for (FusionReactorRecipe recipeType : FusionReactorRecipeHelper.reactorRecipes) {
if (output.matches(MineTweakerMC.getIItemStack(recipeType.getTopInput()))) {
if (output.matches(CraftTweakerMC.getIItemStack(recipeType.getTopInput()))) {
removedRecipes.add(recipeType);
FusionReactorRecipeHelper.reactorRecipes.remove(recipeType);
break;
@ -173,40 +127,13 @@ public class CTFusionReactor {
}
}
@Override
public void undo() {
if (removedRecipes != null) {
for (FusionReactorRecipe recipe : removedRecipes) {
if (recipe != null) {
FusionReactorRecipeHelper.registerRecipe(recipe);
}
}
}
}
@Override
public String describe() {
return "Removing Fusion Reactor recipe";
}
@Override
public String describeUndo() {
return "Re-Adding Fusion Reactor recipe";
}
@Override
public Object getOverrideKey() {
return null;
}
@Override
public boolean canUndo() {
return true;
}
}
private static class RemoveBottomInput implements IUndoableAction {
private static class RemoveBottomInput implements IAction {
private final IIngredient output;
List<FusionReactorRecipe> removedRecipes = new ArrayList<FusionReactorRecipe>();
@ -217,7 +144,7 @@ public class CTFusionReactor {
@Override
public void apply() {
for (FusionReactorRecipe recipeType : FusionReactorRecipeHelper.reactorRecipes) {
if (output.matches(MineTweakerMC.getIItemStack(recipeType.getBottomInput()))) {
if (output.matches(CraftTweakerMC.getIItemStack(recipeType.getBottomInput()))) {
removedRecipes.add(recipeType);
FusionReactorRecipeHelper.reactorRecipes.remove(recipeType);
break;
@ -225,36 +152,10 @@ public class CTFusionReactor {
}
}
@Override
public void undo() {
if (removedRecipes != null) {
for (FusionReactorRecipe recipe : removedRecipes) {
if (recipe != null) {
FusionReactorRecipeHelper.registerRecipe(recipe);
}
}
}
}
@Override
public String describe() {
return "Removing Fusion Reactor recipe";
}
@Override
public String describeUndo() {
return "Re-Adding Fusion Reactor recipe";
}
@Override
public Object getOverrideKey() {
return null;
}
@Override
public boolean canUndo() {
return true;
}
}
}

View file

@ -24,7 +24,7 @@
package techreborn.compat.crafttweaker;
import minetweaker.api.liquid.ILiquidStack;
import crafttweaker.api.liquid.ILiquidStack;
import reborncore.api.fuel.FluidPowerManager;
import stanhebben.zenscript.annotations.ZenClass;

View file

@ -24,10 +24,10 @@
package techreborn.compat.crafttweaker;
import minetweaker.IUndoableAction;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.minecraft.MineTweakerMC;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.IAction;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.minecraft.CraftTweakerMC;
import net.minecraft.item.ItemStack;
import reborncore.api.recipe.IBaseRecipeType;
import reborncore.api.recipe.RecipeHandler;
@ -43,10 +43,10 @@ public class CTGeneric {
}
public static void addRecipe(BaseRecipe recipe) {
MineTweakerAPI.apply(new Add(recipe));
CraftTweakerAPI.apply(new Add(recipe));
}
private static class Add implements IUndoableAction {
private static class Add implements IAction {
private final BaseRecipe recipe;
public Add(BaseRecipe recipe) {
@ -56,37 +56,15 @@ public class CTGeneric {
@Override
public void apply() {
RecipeHandler.addRecipe(recipe);
MineTweakerAPI.getIjeiRecipeRegistry().addRecipe(recipe);
}
@Override
public boolean canUndo() {
return true;
}
@Override
public void undo() {
RecipeHandler.recipeList.remove(recipe);
MineTweakerAPI.getIjeiRecipeRegistry().removeRecipe(recipe);
}
@Override
public String describe() {
return "Adding " + recipe.getRecipeName() + " recipe for " + recipe.getOutput(0).getDisplayName();
}
@Override
public String describeUndo() {
return "Removing " + recipe.getRecipeName() + " recipe for " + recipe.getOutput(0).getDisplayName();
}
@Override
public Object getOverrideKey() {
return null;
}
}
public static class Remove implements IUndoableAction {
public static class Remove implements IAction {
private final ItemStack output;
List<BaseRecipe> removedRecipes = new ArrayList<BaseRecipe>();
private final String name;
@ -103,48 +81,19 @@ public class CTGeneric {
if (ItemUtils.isItemEqual(stack, output, true, false)) {
removedRecipes.add((BaseRecipe) recipeType);
RecipeHandler.recipeList.remove(recipeType);
MineTweakerAPI.getIjeiRecipeRegistry().removeRecipe(recipeType);
break;
}
}
}
}
@Override
public void undo() {
if (removedRecipes != null) {
for (BaseRecipe recipe : removedRecipes) {
if (recipe != null) {
RecipeHandler.addRecipe(recipe);
MineTweakerAPI.getIjeiRecipeRegistry().addRecipe(recipe);
}
}
}
}
@Override
public String describe() {
return "Removing " + name + " recipe for " + output.getDisplayName();
}
@Override
public String describeUndo() {
return "Re-Adding " + name + " recipe for " + output.getDisplayName();
}
@Override
public Object getOverrideKey() {
return null;
}
@Override
public boolean canUndo() {
return true;
}
}
public static class RemoveInput implements IUndoableAction {
public static class RemoveInput implements IAction {
private final IIngredient output;
List<BaseRecipe> removedRecipes = new ArrayList<BaseRecipe>();
private final String name;
@ -159,10 +108,9 @@ public class CTGeneric {
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) {
for (Object stack : recipeType.getInputs()) {
if (stack instanceof ItemStack) {
if (output.matches(MineTweakerMC.getIItemStack((ItemStack) stack))) {
if (output.matches(CraftTweakerMC.getIItemStack((ItemStack) stack))) {
removedRecipes.add((BaseRecipe) recipeType);
RecipeHandler.recipeList.remove(recipeType);
MineTweakerAPI.getIjeiRecipeRegistry().removeRecipe(recipeType);
break;
}
}
@ -170,37 +118,11 @@ public class CTGeneric {
}
}
@Override
public void undo() {
if (removedRecipes != null) {
for (BaseRecipe recipe : removedRecipes) {
if (recipe != null) {
RecipeHandler.addRecipe(recipe);
MineTweakerAPI.getIjeiRecipeRegistry().addRecipe(recipe);
}
}
}
}
@Override
public String describe() {
return "Removing " + name + " recipe";
}
@Override
public String describeUndo() {
return "Re-Adding " + name + " recipe";
}
@Override
public Object getOverrideKey() {
return null;
}
@Override
public boolean canUndo() {
return true;
}
}
}

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTImplosionCompressor extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -48,12 +48,12 @@ public class CTIndustrialElectrolyzer extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,10 +24,10 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.liquid.ILiquidStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.ZenClass;
@ -60,12 +60,12 @@ public class CTIndustrialGrinder extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,10 +24,10 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.liquid.ILiquidStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.liquid.ILiquidStack;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import stanhebben.zenscript.annotations.ZenClass;
@ -71,12 +71,12 @@ public class CTIndustrialSawmill extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,10 +24,10 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.oredict.IOreDictEntry;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.oredict.IOreDictEntry;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
@ -73,7 +73,7 @@ public class CTRollingMachine {
else {
Object internal = iStack.getInternal();
if (internal == null || !(internal instanceof ItemStack)) {
MineTweakerAPI.getLogger().logError("Not a valid item stack: " + iStack);
CraftTweakerAPI.getLogger().logError("Not a valid item stack: " + iStack);
}
return (ItemStack) internal;

View file

@ -24,8 +24,8 @@
package techreborn.compat.crafttweaker;
import minetweaker.api.item.IIngredient;
import minetweaker.api.minecraft.MineTweakerMC;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.minecraft.CraftTweakerMC;
import reborncore.api.recipe.RecipeHandler;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -40,8 +40,8 @@ public class CTScrapbox {
@ZenMethod
public static void addScrapboxDrop(IIngredient input) {
ScrapboxList.stacks.add(MineTweakerMC.getItemStack(input));
RecipeHandler.addRecipe(new ScrapboxRecipe(MineTweakerMC.getItemStack(input)));
ScrapboxList.stacks.add(CraftTweakerMC.getItemStack(input));
RecipeHandler.addRecipe(new ScrapboxRecipe(CraftTweakerMC.getItemStack(input)));
}
}

View file

@ -24,9 +24,9 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import net.minecraft.item.ItemStack;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
@ -46,12 +46,12 @@ public class CTVacuumFreezer extends CTGeneric {
@ZenMethod
public static void removeInputRecipe(IIngredient iIngredient) {
MineTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
CraftTweakerAPI.apply(new RemoveInput(iIngredient, getMachineName()));
}
@ZenMethod
public static void removeRecipe(IItemStack output) {
MineTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
}
public static String getMachineName() {

View file

@ -24,12 +24,12 @@
package techreborn.compat.crafttweaker;
import minetweaker.MineTweakerAPI;
import minetweaker.api.item.IIngredient;
import minetweaker.api.item.IItemStack;
import minetweaker.api.item.IngredientStack;
import minetweaker.api.liquid.ILiquidStack;
import minetweaker.api.oredict.IOreDictEntry;
import crafttweaker.CraftTweakerAPI;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.IngredientStack;
import crafttweaker.api.liquid.ILiquidStack;
import crafttweaker.api.oredict.IOreDictEntry;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
@ -39,8 +39,8 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import techreborn.compat.ICompatModule;
import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
import static minetweaker.api.minecraft.MineTweakerMC.getLiquidStack;
import static crafttweaker.api.minecraft.CraftTweakerMC.getItemStack;
import static crafttweaker.api.minecraft.CraftTweakerMC.getLiquidStack;
public class CraftTweakerCompat implements ICompatModule {
public static ItemStack toStack(IItemStack iStack) {
@ -69,7 +69,21 @@ public class CraftTweakerCompat implements ICompatModule {
@Override
public void preInit(FMLPreInitializationEvent event) {
CraftTweakerAPI.registerClass(CTAlloySmelter.class);
CraftTweakerAPI.registerClass(CTAssemblingMachine.class);
CraftTweakerAPI.registerClass(CTBlastFurnace.class);
CraftTweakerAPI.registerClass(CTCentrifuge.class);
CraftTweakerAPI.registerClass(CTChemicalReactor.class);
CraftTweakerAPI.registerClass(CTCompressor.class);
CraftTweakerAPI.registerClass(CTIndustrialGrinder.class);
CraftTweakerAPI.registerClass(CTImplosionCompressor.class);
CraftTweakerAPI.registerClass(CTIndustrialElectrolyzer.class);
CraftTweakerAPI.registerClass(CTIndustrialSawmill.class);
CraftTweakerAPI.registerClass(CTFusionReactor.class);
CraftTweakerAPI.registerClass(CTVacuumFreezer.class);
CraftTweakerAPI.registerClass(CTGenerator.class);
CraftTweakerAPI.registerClass(CTRollingMachine.class);
CraftTweakerAPI.registerClass(CTScrapbox.class);
}
@Override
@ -79,21 +93,7 @@ public class CraftTweakerCompat implements ICompatModule {
@Override
public void postInit(FMLPostInitializationEvent event) {
MineTweakerAPI.registerClass(CTAlloySmelter.class);
MineTweakerAPI.registerClass(CTAssemblingMachine.class);
MineTweakerAPI.registerClass(CTBlastFurnace.class);
MineTweakerAPI.registerClass(CTCentrifuge.class);
MineTweakerAPI.registerClass(CTChemicalReactor.class);
MineTweakerAPI.registerClass(CTCompressor.class);
MineTweakerAPI.registerClass(CTIndustrialGrinder.class);
MineTweakerAPI.registerClass(CTImplosionCompressor.class);
MineTweakerAPI.registerClass(CTIndustrialElectrolyzer.class);
MineTweakerAPI.registerClass(CTIndustrialSawmill.class);
MineTweakerAPI.registerClass(CTFusionReactor.class);
MineTweakerAPI.registerClass(CTVacuumFreezer.class);
MineTweakerAPI.registerClass(CTGenerator.class);
MineTweakerAPI.registerClass(CTRollingMachine.class);
MineTweakerAPI.registerClass(CTScrapbox.class);
}
@Override