Removed more junk
This commit is contained in:
parent
363adeb681
commit
935a8bc382
9 changed files with 3 additions and 434 deletions
|
@ -1,129 +0,0 @@
|
|||
package techreborn.compat.minetweaker;
|
||||
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import techreborn.api.recipe.IBaseRecipeType;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
|
||||
import techreborn.lib.Reference;
|
||||
import techreborn.util.ItemUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ZenClass("mods.techreborn.assemblingMachine")
|
||||
public class MTAssemblingMachine {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IIngredient input1, IIngredient input2, int ticktime, int euTick) {
|
||||
ItemStack oInput1 = (ItemStack) MinetweakerCompat.toObject(input1);
|
||||
ItemStack oInput2 = (ItemStack) MinetweakerCompat.toObject(input2);
|
||||
|
||||
AssemblingMachineRecipe r = new AssemblingMachineRecipe(oInput1, oInput2, MinetweakerCompat.toStack(output), ticktime, euTick);
|
||||
|
||||
MineTweakerAPI.apply(new Add(r));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction {
|
||||
private final AssemblingMachineRecipe recipe;
|
||||
|
||||
public Add(AssemblingMachineRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
RecipeHandler.addRecipe(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
RecipeHandler.recipeList.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Assembling Machine Recipe for " + recipe.getOutput(0).getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
return "Removing Assembling Machine Recipe for " + recipe.getOutput(0).getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output)
|
||||
{
|
||||
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output)));
|
||||
}
|
||||
private static class Remove implements IUndoableAction
|
||||
{
|
||||
private final ItemStack output;
|
||||
List<AssemblingMachineRecipe> removedRecipes = new ArrayList<AssemblingMachineRecipe>();
|
||||
public Remove(ItemStack output)
|
||||
{
|
||||
this.output = output;
|
||||
}
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for(IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(Reference.assemblingMachineRecipe)){
|
||||
for(ItemStack stack : recipeType.getOutputs()){
|
||||
if(ItemUtils.isItemEqual(stack, output, true, false)){
|
||||
removedRecipes.add((AssemblingMachineRecipe) recipeType);
|
||||
RecipeHandler.recipeList.remove(recipeType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void undo()
|
||||
{
|
||||
if(removedRecipes!=null){
|
||||
for(AssemblingMachineRecipe recipe : removedRecipes){
|
||||
if(recipe!=null){
|
||||
RecipeHandler.addRecipe(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "Removing Assembling Machine Recipe for " + output.getDisplayName();
|
||||
}
|
||||
@Override
|
||||
public String describeUndo()
|
||||
{
|
||||
return "Re-Adding Assembling Machine Recipe for " + output.getDisplayName();
|
||||
}
|
||||
@Override
|
||||
public Object getOverrideKey()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public boolean canUndo()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
package techreborn.compat.minetweaker;
|
||||
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import techreborn.api.recipe.IBaseRecipeType;
|
||||
import techreborn.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.machines.LatheRecipe;
|
||||
import techreborn.lib.Reference;
|
||||
import techreborn.util.ItemUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ZenClass("mods.techreborn.lathe")
|
||||
public class MTLathe {
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IItemStack output, IIngredient input1, int ticktime, int euTick) {
|
||||
ItemStack oInput1 = (ItemStack) MinetweakerCompat.toObject(input1);
|
||||
|
||||
LatheRecipe r = new LatheRecipe(oInput1, MinetweakerCompat.toStack(output), ticktime, euTick);
|
||||
|
||||
MineTweakerAPI.apply(new Add(r));
|
||||
}
|
||||
|
||||
private static class Add implements IUndoableAction {
|
||||
private final LatheRecipe recipe;
|
||||
|
||||
public Add(LatheRecipe recipe) {
|
||||
this.recipe = recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
RecipeHandler.addRecipe(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
RecipeHandler.recipeList.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding Lathe Recipe for " + recipe.getOutput(0).getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
return "Removing Lathe Recipe for " + recipe.getOutput(0).getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(IItemStack output) {
|
||||
MineTweakerAPI.apply(new Remove(MinetweakerCompat.toStack(output)));
|
||||
}
|
||||
|
||||
private static class Remove implements IUndoableAction {
|
||||
private final ItemStack output;
|
||||
List<LatheRecipe> removedRecipes = new ArrayList<LatheRecipe>();
|
||||
|
||||
public Remove(ItemStack output) {
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(Reference.latheRecipe)) {
|
||||
for (ItemStack stack : recipeType.getOutputs()) {
|
||||
if (ItemUtils.isItemEqual(stack, output, true, false)) {
|
||||
removedRecipes.add((LatheRecipe) recipeType);
|
||||
RecipeHandler.recipeList.remove(recipeType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
if (removedRecipes != null) {
|
||||
for (LatheRecipe recipe : removedRecipes) {
|
||||
if (recipe != null) {
|
||||
RecipeHandler.addRecipe(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Removing Lathe Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
return "Re-Adding Lathe Recipe for " + output.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,7 +33,6 @@ public class MinetweakerCompat implements ICompatModule {
|
|||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
MineTweakerAPI.registerClass(MTAlloySmelter.class);
|
||||
MineTweakerAPI.registerClass(MTAssemblingMachine.class);
|
||||
MineTweakerAPI.registerClass(MTBlastFurnace.class);
|
||||
MineTweakerAPI.registerClass(MTCentrifuge.class);
|
||||
MineTweakerAPI.registerClass(MTChemicalReactor.class);
|
||||
|
@ -41,7 +40,6 @@ public class MinetweakerCompat implements ICompatModule {
|
|||
MineTweakerAPI.registerClass(MTImplosionCompressor.class);
|
||||
MineTweakerAPI.registerClass(MTIndustrialElectrolyzer.class);
|
||||
MineTweakerAPI.registerClass(MTIndustrialSawmill.class);
|
||||
MineTweakerAPI.registerClass(MTLathe.class);
|
||||
MineTweakerAPI.registerClass(MTPlateCuttingMachine.class);
|
||||
}
|
||||
|
||||
|
|
|
@ -373,44 +373,6 @@ public class RecipesIC2 implements ICompatModule {
|
|||
//Blast Furnace
|
||||
RecipeHandler.addRecipe(new BlastFurnaceRecipe(ItemCells.getCellByName("silicon", 2), null, ItemPlates.getPlateByName("silicon"), new ItemStack(IC2Items.getItem("cell").getItem(), 2), 1000, 120, 1500));
|
||||
|
||||
//AssemblingMachineRecipes
|
||||
|
||||
//Electronic Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("basicCircuitBoard", 1), new ItemStack(IC2Items.getItem("insulatedCopperCableItem").getItem(), 3), IC2Items.getItem("electronicCircuit"), 120, 5));
|
||||
|
||||
|
||||
//Advanced Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("advancedCircuitBoard", 1), ItemParts.getPartByName("advancedCircuitParts", 2), IC2Items.getItem("advancedCircuit"), 120, 5));
|
||||
|
||||
//Energy Flow Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("processorCircuitBoard", 1), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.parts, 1, 4), 120, 5));
|
||||
|
||||
|
||||
//Data Storage Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("emerald", 8), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("dataStorageCircuit", 1), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("peridot", 8), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("dataStorageCircuit", 1), 120, 5));
|
||||
|
||||
//Advanced Circuit Board
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("electrum", 2), IC2Items.getItem("electronicCircuit"), ItemParts.getPartByName("advancedCircuitBoard", 1), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("electrum", 4), ItemPlates.getPlateByName("silicon", 1), ItemParts.getPartByName("advancedCircuitBoard", 2), 120, 5));
|
||||
|
||||
//Processor Circuit Board
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("platinum", 1), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("processorCircuitBoard", 1), 120, 5));
|
||||
|
||||
//Frequency Transmitter
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(IC2Items.getItem("electronicCircuit"), IC2Items.getItem("insulatedCopperCableItem"), IC2Items.getItem("frequencyTransmitter"), 120, 5));
|
||||
|
||||
//Wind Mill
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("magnalium", 2), IC2Items.getItem("generator"), IC2Items.getItem("windMill"), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(IC2Items.getItem("carbonPlate").getItem(), 4), IC2Items.getItem("generator"), IC2Items.getItem("windMill"), 120, 5));
|
||||
|
||||
//Water Mill
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
|
||||
|
||||
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
|
||||
|
||||
|
||||
//CentrifugeRecipes
|
||||
|
||||
//Plantball/Bio Chaff
|
||||
|
@ -418,10 +380,6 @@ public class RecipesIC2 implements ICompatModule {
|
|||
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Blocks.dirt, 16), null, new ItemStack(IC2Items.getItem("biochaff").getItem(), 4), new ItemStack(IC2Items.getItem("plantBall").getItem(), 4), new ItemStack(Items.clay_ball), new ItemStack(Blocks.sand, 8), 2500, 5));
|
||||
|
||||
|
||||
//Industrial TNT
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemDusts.getDustByName("flint", 5), new ItemStack(Blocks.tnt), new ItemStack(IC2Items.getItem("industrialTnt").getItem(), 5), 120, 5));
|
||||
|
||||
|
||||
//Methane
|
||||
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.mushroom_stew, 16), IC2Items.getItem("cell"), ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
|
||||
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.apple, 32), IC2Items.getItem("cell"), ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
|
||||
|
|
|
@ -369,51 +369,9 @@ public class RecipesIC2Classic implements ICompatModule {
|
|||
//Blast Furnace
|
||||
RecipeHandler.addRecipe(new BlastFurnaceRecipe(ItemCells.getCellByName("silicon", 2), null, ItemPlates.getPlateByName("silicon"), new ItemStack(IC2Items.getItem("cell").getItem(), 2), 1000, 120, 1500));
|
||||
|
||||
//AssemblingMachineRecipes
|
||||
|
||||
//Electronic Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("basicCircuitBoard", 1), new ItemStack(IC2Items.getItem("insulatedCopperCableItem").getItem(), 3), IC2Items.getItem("electronicCircuit"), 120, 5));
|
||||
|
||||
|
||||
//Advanced Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("advancedCircuitBoard", 1), ItemParts.getPartByName("advancedCircuitParts", 2), IC2Items.getItem("advancedCircuit"), 120, 5));
|
||||
|
||||
//Energy Flow Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("processorCircuitBoard", 1), new ItemStack(IC2Items.getItem("lapotronCrystal").getItem(), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.parts, 1, 4), 120, 5));
|
||||
|
||||
|
||||
//Data Storage Circuit
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("emerald", 8), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("dataStorageCircuit", 1), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("peridot", 8), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("dataStorageCircuit", 1), 120, 5));
|
||||
|
||||
//Advanced Circuit Board
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("electrum", 2), IC2Items.getItem("electronicCircuit"), ItemParts.getPartByName("advancedCircuitBoard", 1), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("electrum", 4), ItemPlates.getPlateByName("silicon", 1), ItemParts.getPartByName("advancedCircuitBoard", 2), 120, 5));
|
||||
|
||||
//Processor Circuit Board
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("platinum", 1), IC2Items.getItem("advancedCircuit"), ItemParts.getPartByName("processorCircuitBoard", 1), 120, 5));
|
||||
|
||||
//Frequency Transmitter
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(IC2Items.getItem("electronicCircuit"), IC2Items.getItem("insulatedCopperCableItem"), IC2Items.getItem("frequencyTransmitter"), 120, 5));
|
||||
|
||||
//Wind Mill
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("magnalium", 2), IC2Items.getItem("generator"), IC2Items.getItem("windMill"), 120, 5));
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(IC2Items.getItem("carbonPlate").getItem(), 4), IC2Items.getItem("generator"), IC2Items.getItem("windMill"), 120, 5));
|
||||
|
||||
//Water Mill
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
|
||||
|
||||
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 4), IC2Items.getItem("generator"), IC2Items.getItem("waterMill"), 120, 5));
|
||||
|
||||
|
||||
//CentrifugeRecipes
|
||||
|
||||
|
||||
//Industrial TNT
|
||||
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemDusts.getDustByName("flint", 5), new ItemStack(Blocks.tnt), new ItemStack(IC2Items.getItem("industrialTnt").getItem(), 5), 120, 5));
|
||||
|
||||
|
||||
//Methane
|
||||
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.mushroom_stew, 16), IC2Items.getItem("cell"), ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
|
||||
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.apple, 32), IC2Items.getItem("cell"), ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue