Removed more junk

This commit is contained in:
gigabit101 2015-10-09 22:11:04 +01:00
parent 363adeb681
commit 935a8bc382
9 changed files with 3 additions and 434 deletions

View file

@ -1,6 +1,6 @@
# TechReborn
TechReborn is a resurrection of GregTech 4 for modern Minecraft. It brings most of GT4's features and behaviors to Minecraft, with lots of tweaks, and a few editions. It also aims to be more compatible with other mods than GregTech, and has the ultimate goal of becoming a standalone mod, compatible with but not dependent on IC2.
TechReborn is a resurrection of GregTech 2.78 for modern Minecraft. It brings most of GT4's features and behaviors to Minecraft, with lots of tweaks, and a few editions. It also aims to be more compatible with other mods than GregTech, and has the ultimate goal of becoming a standalone mod, compatible with but not dependent on IC2.
TechReborn is currently in a beta state.
@ -17,3 +17,5 @@ If you need to debug the coremod method striping code you must use a custom laun
`-Dfml.coreMods.load=techreborn.asm.LoadingPlugin`
Add that to your JVM arguments in the run configurations in your chosen IDE. This is not mandatory but it is only needed if you want to debug the asm core mod code.
REMOVED ALL THE JUNK FROM OTHER VERSION 2.78 ONLY

View file

@ -1,23 +0,0 @@
package techreborn.api.recipe.machines;
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
public class AssemblingMachineRecipe extends BaseRecipe {
public AssemblingMachineRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.assemblingMachineRecipe, tickTime, euPerTick);
if (input1 != null)
inputs.add(input1);
if (input2 != null)
inputs.add(input2);
if (output1 != null)
addOutput(output1);
}
@Override
public String getUserFreindlyName() {
return "Assembling Machine";
}
}

View file

@ -1,21 +0,0 @@
package techreborn.api.recipe.machines;
import net.minecraft.item.ItemStack;
import techreborn.api.recipe.BaseRecipe;
import techreborn.lib.Reference;
public class LatheRecipe extends BaseRecipe {
public LatheRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.latheRecipe, tickTime, euPerTick);
if (input1 != null)
inputs.add(input1);
if (output1 != null)
addOutput(output1);
}
@Override
public String getUserFreindlyName() {
return "Lathe";
}
}

View file

@ -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;
}
}
}

View file

@ -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;
}
}
}

View file

@ -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);
}

View file

@ -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));

View file

@ -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));

View file

@ -11,14 +11,12 @@ import org.apache.commons.lang3.ArrayUtils;
import techreborn.api.TechRebornAPI;
import techreborn.api.recipe.RecipeHandler;
import techreborn.api.recipe.machines.AlloySmelterRecipe;
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.IndustrialElectrolyzerRecipe;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.api.recipe.machines.LatheRecipe;
import techreborn.api.recipe.machines.PlateCuttingMachineRecipe;
import techreborn.blocks.BlockMachineFrame;
import techreborn.blocks.BlockOre;
@ -53,7 +51,6 @@ public class
addAlloySmelterRecipes();
addPlateCuttingMachineRecipes();
addAssemblingMachineRecipes();
addIndustrialCentrifugeRecipes();
addChemicalReactorRecipes();
addIndustrialElectrolyzerRecipes();
@ -895,50 +892,6 @@ public class
//TODO
}
static void addAssemblingMachineRecipes() {
//Ender Eye
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.blaze_powder), new ItemStack(Items.ender_eye), 120, 5));
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.ender_pearl, 6), new ItemStack(Items.blaze_rod), new ItemStack(Items.ender_eye, 6), 120, 5));
//Redstone Lamp
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.redstone, 4), new ItemStack(Items.glowstone_dust, 4), new ItemStack(Blocks.redstone_lamp), 120, 5));
//Note Block
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Blocks.planks, 8), new ItemStack(Items.redstone, 1), new ItemStack(Blocks.noteblock), 120, 5));
//Jukebox
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.diamond, 1), new ItemStack(Blocks.planks, 8), new ItemStack(Blocks.jukebox), 120, 5));
//Clock
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.redstone, 1), new ItemStack(Items.gold_ingot, 4), new ItemStack(Items.clock), 120, 5));
//Compass
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.redstone, 1), new ItemStack(Items.iron_ingot, 4), new ItemStack(Items.clock), 120, 5));
//Lead
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.string, 1), new ItemStack(Items.slime_ball, 1), new ItemStack(Items.lead, 2), 120, 5));
//Circuit Parts
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.glowstone_dust), ItemDusts.getDustByName("lazurite", 1), ItemParts.getPartByName("advancedCircuitParts", 2), 120, 5));
RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.glowstone_dust), ItemDusts.getDustByName("lapis", 1), ItemParts.getPartByName("advancedCircuitParts", 2), 120, 5));
//Data Control Circuit
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("processorCircuitBoard", 1), ItemParts.getPartByName("dataStorageCircuit", 1), ItemParts.getPartByName("dataControlCircuit", 1), 120, 5));
//Data Orb
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("dataControlCircuit", 1), ItemParts.getPartByName("dataStorageCircuit", 8), ItemParts.getPartByName("dataOrb"), 120, 5));
//Basic Circuit Board
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("aluminum", 1), ItemPlates.getPlateByName("electrum", 2), ItemParts.getPartByName("basicCircuitBoard", 2), 120, 5));
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemPlates.getPlateByName("iron", 1), ItemPlates.getPlateByName("electrum", 2), ItemParts.getPartByName("basicCircuitBoard", 2), 120, 5));
for (String type : BlockMachineFrame.types) {
RecipeHandler.addRecipe(new AssemblingMachineRecipe(ItemParts.getPartByName("machineParts", 1), ItemPlates.getPlateByName(type, 8), BlockMachineFrame.getFrameByName(type, 1), 400, 8));
}
}
static void addIndustrialCentrifugeRecipes() {
//Mycelium Byproducts