Browse Source

Replace ShapedRecipes/ShapelessRecipes with ShapedOreRecipes/ShapelessOreRecipes, to allow for swapping of chests, feathers, etc. to oredict versions

Qwertygiy 2 years ago
parent
commit
7c073d0481

+ 12
- 0
.travis-deploy.yml View File

@@ -0,0 +1,12 @@
1
+language: java
2
+script: gradle build
3
+before_deploy: git config --local user.name "Qwertygiy" & git config --local user.email "qwertygiy@gmail.com" & export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)} & git tag $TRAVIS_TAG
4
+deploy:
5
+  provider: releases
6
+  api_key:
7
+    secure: "721dc89d4af0a39be228c9f9f0ae4c7b3c2e7db4"
8
+  file_glob: true
9
+  file: build/libs/*
10
+  skip_cleanup: true
11
+  name: ${TRAVIS_TAG}
12
+  prerelease: true

+ 1
- 11
.travis.yml View File

@@ -1,12 +1,2 @@
1 1
 language: java
2
-script: gradle build
3
-before_deploy: git config --local user.name "Qwertygiy" & git config --local user.email "qwertygiy@gmail.com" & export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)} & git tag $TRAVIS_TAG
4
-deploy:
5
-  provider: releases
6
-  api_key:
7
-    secure: "721dc89d4af0a39be228c9f9f0ae4c7b3c2e7db4"
8
-  file_glob: true
9
-  file: build/libs/*
10
-  skip_cleanup: true
11
-  name: ${TRAVIS_TAG}
12
-  prerelease: true
2
+script: gradle build

+ 382
- 353
src/main/java/com/kbi/qwertech/api/recipe/managers/CraftingManagerHammer.java View File

@@ -1,353 +1,382 @@
1
-package com.kbi.qwertech.api.recipe.managers;
2
-
3
-import com.kbi.qwertech.api.data.QTConfigs;
4
-import com.kbi.qwertech.api.data.QTI;
5
-import com.kbi.qwertech.api.recipe.HammerablePrefixRecipe;
6
-import com.kbi.qwertech.api.recipe.HammerableShapedRecipe;
7
-import com.kbi.qwertech.api.recipe.QTArmor;
8
-import com.kbi.qwertech.api.recipe.RepairRecipe;
9
-import gregapi.code.ICondition;
10
-import gregapi.config.ConfigCategories;
11
-import gregapi.data.CS;
12
-import gregapi.data.MT;
13
-import gregapi.data.OP;
14
-import gregapi.data.TD;
15
-import gregapi.oredict.OreDictManager;
16
-import gregapi.oredict.OreDictMaterialStack;
17
-import gregapi.oredict.OreDictPrefix;
18
-import gregapi.recipes.ICraftingRecipeGT;
19
-import gregapi.util.ST;
20
-import gregtech.loaders.b.Loader_OreProcessing;
21
-import net.minecraft.init.Items;
22
-import net.minecraft.inventory.InventoryCrafting;
23
-import net.minecraft.item.ItemStack;
24
-import net.minecraft.item.crafting.CraftingManager;
25
-import net.minecraft.item.crafting.IRecipe;
26
-import net.minecraft.item.crafting.ShapedRecipes;
27
-import net.minecraft.item.crafting.ShapelessRecipes;
28
-import net.minecraft.world.World;
29
-import net.minecraftforge.oredict.OreDictionary;
30
-import net.minecraftforge.oredict.ShapedOreRecipe;
31
-import net.minecraftforge.oredict.ShapelessOreRecipe;
32
-
33
-import java.util.ArrayList;
34
-import java.util.HashMap;
35
-import java.util.List;
36
-
37
-public class CraftingManagerHammer implements Runnable {
38
-
39
-	private static final CraftingManagerHammer instance = new CraftingManagerHammer();
40
-    /** A list of all the recipes added */
41
-    private List recipes = new ArrayList();
42
-    
43
-    public static HashMap<ItemStack, String> replacems = new HashMap<ItemStack, String>();
44
-
45
-    private static boolean hasRun = false;
46
-
47
-    /**
48
-     * Returns the static instance of this class
49
-     */
50
-    public static CraftingManagerHammer getInstance()
51
-    {
52
-        /* The static instance of this class */
53
-        return instance;
54
-    }
55
-
56
-    public static boolean replaceItems(IRecipe recipe, ArrayList items)
57
-	{
58
-		boolean removeIt = false;
59
-		for (int w = 0; w < items.size(); w++)
60
-		{
61
-			Object slot = items.get(w);
62
-			if (slot instanceof ItemStack)
63
-			{
64
-				ItemStack theSlot = (ItemStack)slot;
65
-				if (!(recipe instanceof ICraftingRecipeGT))
66
-				{
67
-					for (ItemStack key : replacems.keySet())
68
-					{
69
-						if (ST.equal(key, theSlot))
70
-						{
71
-							items.set(w, OreDictionary.getOres(replacems.get(key)));
72
-						}
73
-					}
74
-				}
75
-				if (OreDictManager.isItemStackInstanceOf(theSlot, "craftingToolHardHammer"))
76
-				{
77
-					items.remove(w);
78
-					removeIt = true;
79
-					w = w - 1;
80
-					break;
81
-				}
82
-			} else if (slot instanceof List && ((List)slot).size() > 0)
83
-			{
84
-				for (int q = 0; q < ((List)slot).size(); q++) {
85
-					ItemStack spot = (ItemStack) ((List) slot).get(q);
86
-					if (spot != null && OreDictManager.isItemStackInstanceOf(spot, "craftingToolHardHammer")) {
87
-						items.remove(w);
88
-						removeIt = true;
89
-						w = w - 1;
90
-						break;
91
-					}
92
-				}
93
-			}
94
-		}
95
-		return removeIt;
96
-	}
97
-
98
-	public static boolean replaceItems(IRecipe recipe, Object[] items)
99
-	{
100
-		boolean removeIt = false;
101
-		for (int w = 0; w < items.length; w++)
102
-		{
103
-			Object slot = items[w];
104
-			if (slot instanceof ItemStack)
105
-			{
106
-				ItemStack theSlot = (ItemStack)slot;
107
-				if (!(recipe instanceof ICraftingRecipeGT))
108
-				{
109
-					for (ItemStack key : replacems.keySet())
110
-					{
111
-						if (ST.equal(key, theSlot))
112
-						{
113
-							items[w] = OreDictionary.getOres(replacems.get(key));
114
-						}
115
-					}
116
-				}
117
-				if (OreDictManager.isItemStackInstanceOf(theSlot, "craftingToolHardHammer"))
118
-				{
119
-					items[w] = null;
120
-					removeIt = true;
121
-				}
122
-			} else if (slot instanceof List)
123
-			{
124
-
125
-				for (int q = 0; q < ((List)slot).size(); q++) {
126
-					ItemStack spot = (ItemStack) ((List) slot).get(q);
127
-					if (OreDictManager.isItemStackInstanceOf(spot, "craftingToolHardHammer")) {
128
-						items[w] = null;
129
-						removeIt = true;
130
-						break;
131
-					}
132
-				}
133
-			}
134
-		}
135
-		return removeIt;
136
-	}
137
-    
138
-    public static void searchAndReplace()
139
-    {
140
-    	if (QTConfigs.allHammers && !hasRun)
141
-    	{
142
-			List oldRecipes = CraftingManager.getInstance().getRecipeList();
143
-			System.out.println("Parsing through " + oldRecipes.size() + " recipes to remove hammers...");
144
-	    	int count = 0;
145
-	    	for (int q = 0; q < oldRecipes.size(); q++)
146
-	    	{
147
-	    		try {
148
-					boolean removelIt = false;
149
-					IRecipe recipe = (IRecipe)oldRecipes.get(q);
150
-					if (recipe instanceof ShapelessOreRecipe) {
151
-						ArrayList items = ((ShapelessOreRecipe) recipe).getInput();
152
-						removelIt = replaceItems(recipe, items);
153
-					} else if (recipe instanceof ShapedOreRecipe) {
154
-						Object[] items = ((ShapedOreRecipe) recipe).getInput();
155
-						removelIt = replaceItems(recipe, items);
156
-					} else if (recipe instanceof ShapedRecipes) {
157
-						ItemStack[] items = ((ShapedRecipes) recipe).recipeItems;
158
-						removelIt = replaceItems(recipe, items);
159
-					} else if (recipe instanceof ShapelessRecipes) {
160
-						//immutable :/
161
-					}
162
-					if (removelIt) {
163
-						instance.addRecipe(recipe);
164
-						oldRecipes.remove(recipe);
165
-						count = count + 1;
166
-						q = q - 1;
167
-					}
168
-				} catch (Throwable t) {
169
-	    			System.out.println("Exception found!");
170
-	    			t.printStackTrace();
171
-				}
172
-	    	}
173
-	    	System.out.println("Parsing complete, found " + count + " hammer recipes");
174
-    	} else {
175
-			if (QTConfigs.anyHammers) {
176
-				String tCategory = ConfigCategories.Recipes.gregtechrecipes + ".";
177
-				//OP.ingotDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotDouble", new String[][]{{"h", "I", "I"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
178
-				//OP.ingotTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotTriple", new String[][]{{"h", "I", "X"}}, OP.ingotDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
179
-				//OP.ingotQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotQuadruple", new String[][]{{"h", "I", "X"}}, OP.ingotTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
180
-				//OP.ingotQuintuple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotQuintuple", new String[][]{{"h", "I", "X"}}, OP.ingotQuadruple, null, null,null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
181
-				//OP.plateTiny.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "chunkGt2plateTiny", new String[][]{{"h", "X"}}, OP.chunkGt, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
182
-				//OP.plate.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plateCurved2plate", new String[][]{{"h", "X"}}, OP.plateCurved, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
183
-				//OP.plate.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plate", new String[][]{{"h", "X"}}, OP.ingotDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
184
-				//OP.plateDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateDouble", new String[][]{{"h", "X"}}, OP.ingotTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
185
-				//OP.plateTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateTriple", new String[][]{{"h", "X"}}, OP.ingotQuadruple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
186
-				//OP.plateQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateQuadruple", new String[][]{{"h", "X"}}, OP.ingotQuintuple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
187
-				//OP.plateDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateDouble", new String[][]{{"h", "P", "P"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
188
-				//OP.plateTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateTriple", new String[][]{{"h", "P", "X"}}, OP.plateDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
189
-				//OP.plateQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateQuadruple", new String[][]{{"h", "P", "X"}}, OP.plateTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
190
-				//OP.plateQuintuple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateQuintuple", new String[][]{{"h", "P", "X"}}, OP.plateQuadruple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
191
-				//OP.plateCurved.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plate2plateCurved", new String[][]{{"h", "P", "z"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
192
-				OP.ring.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2ring", new String[][]{{"hS", " o"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
193
-				OP.spring.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2spring", new String[][]{{"zXh"}}, OP.stickLong, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
194
-				OP.springSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "wire2springSmall", new String[][]{{"oXh"}}, OP.wireGt01, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
195
-				OP.springSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2springSmall", new String[][]{{"oSh"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
196
-				OP.foil.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(2L, tCategory + "plate2foil", new String[][]{{"hPz"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
197
-				OP.casingSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plate2casingSmall", new String[][]{{"h P"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
198
-				OP.stickLong.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "sticks2stickLong", new String[][]{{"ShS"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
199
-				OP.rotor.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "rotor", new String[][]{{"YhY", "TXf", "YdY"}}, OP.ring, OP.plateCurved, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
200
-				OP.toolHeadBuzzSaw.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "toolHeadBuzzSaw", new String[][]{{"wPh", "P P", "fPx"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT)));
201
-				OP.toolHeadBuzzSaw.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "toolHeadBuzzSaw", new String[][]{{"wCh", "C C", "fCx"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT)));
202
-			}
203
-		}
204
-    }
205
-
206
-    private CraftingManagerHammer() {
207
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingot, 			OP.ingot}					).setVertical());
208
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingot, 			OP.ingot, 		OP.ingot}	).setVertical());
209
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingot}					).setVertical());
210
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingot}					).setVertical());
211
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingot, 		OP.ingot}	).setVertical());
212
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingotDouble}				).setVertical());
213
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingotDouble}				).setVertical());
214
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingot, 		OP.ingot}	).setVertical());
215
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuadruple, OP.ingot}					).setVertical());
216
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingotDouble, OP.ingot}	).setVertical());
217
-    	
218
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plate,  			new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble}								));
219
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple}								));
220
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuadruple}								));
221
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuintuple}								));
222
-    	
223
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plate, 			OP.plate}					).setVertical());
224
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plate, 			OP.plate, 		OP.plate}	).setVertical());
225
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plate}					).setVertical());
226
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plate}					).setVertical());
227
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plate, OP.plate}			).setVertical());
228
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plateDouble}				).setVertical());
229
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plateDouble}				).setVertical());
230
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plate, OP.plate}			).setVertical());
231
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateQuadruple, OP.plate}					).setVertical());
232
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plateDouble, OP.plate}	).setVertical());
233
-    	
234
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plate,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plateCurved}));
235
-    	//this.addRecipe(new HammerablePrefixRecipe(OP.foil,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate},		 	"craftingToolBendingCylinder").setHorizontal());
236
-    	//this.addRecipe(new HammerablePrefixRecipe(OP.plateCurved,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate},		 	"craftingToolBendingCylinder").setVertical());
237
-    	this.addRecipe(new HammerablePrefixRecipe(OP.ring,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick}, 		"craftingToolBendingCylinderSmall").setVertical());
238
-    	this.addRecipe(new HammerablePrefixRecipe(OP.spring, 	 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stickLong}, 	"craftingToolBendingCylinder").setHorizontal());
239
-    	this.addRecipe(new HammerablePrefixRecipe(OP.springSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.wireGt01}, 		"craftingToolBendingCylinderSmall").setHorizontal());
240
-    	this.addRecipe(new HammerablePrefixRecipe(OP.springSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick}, 		"craftingToolBendingCylinderSmall").setHorizontal());
241
-    	this.addRecipe(new HammerablePrefixRecipe(OP.casingSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate}));
242
-    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTiny,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.nugget}));
243
-    	this.addRecipe(new HammerablePrefixRecipe(OP.stickLong, 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick,			OP.stick}					));
244
-
245
-    	this.addRecipe(new HammerableShapedRecipe(OP.foil,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"Pb"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
246
-		this.addRecipe(new HammerableShapedRecipe(OP.foil,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"bP"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
247
-    	this.addRecipe(new HammerableShapedRecipe(OP.plateCurved,		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"P", "b"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
248
-
249
-		this.addRecipe(new HammerableShapedRecipe(OP.rotor,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"Y Y", "TXf", "YdY"}, 'Y', OP.plateCurved, 'X', OP.ring, 'T', OP.screw, 'f', "craftingToolFile", 'd', "craftingToolScrewdriver"));
250
-    	
251
-    	this.addRecipe(new HammerableShapedRecipe(OP.toolHeadBuzzSaw,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"wP ", "P P", "fPx"}, 'P', OP.plate, 'x', "craftingToolWireCutter", 'f', "craftingToolFile", 'w', "craftingToolWrench"));
252
-    	this.addRecipe(new HammerableShapedRecipe(OP.toolHeadBuzzSaw,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"wC ", "C C", "fCx"}, 'C', OP.plateGem, 'x', "craftingToolWireCutter", 'f', "craftingToolFile", 'w', "craftingToolWrench"));
253
-    	
254
-    	this.addRecipe(new HammerablePrefixRecipe(OP.gemExquisite, 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemLegendary}					));
255
-    	this.addRecipe(new HammerablePrefixRecipe(OP.gemFlawless, 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemExquisite}					));
256
-    	this.addRecipe(new HammerablePrefixRecipe(OP.gem,			 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemFlawless}					));
257
-    	this.addRecipe(new HammerablePrefixRecipe(OP.gemFlawed,	 	2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gem}							));
258
-    	this.addRecipe(new HammerablePrefixRecipe(OP.gemChipped, 	2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemFlawed}						));
259
-    	this.addRecipe(new HammerablePrefixRecipe(OP.dustSmall, 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemChipped}						));
260
-    	
261
-    	//this.addRecipe(new HammerablePrefixRecipe(OreDictPrefix.get("link"),new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),						new Object[]{OP.ring}							));
262
-    	this.addRecipe(new HammerablePrefixRecipe(OreDictPrefix.get("chain"),new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 					new Object[]{OP.stick, OP.stick, OP.stick, OP.stick}, "craftingToolBendingCylinderSmall"));
263
-    	
264
-    	if (QTConfigs.enableArmor)
265
-    	{
266
-    		this.addRecipe(new QTArmor(7,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "D D", "P P", 'D', OP.plateDouble, 'P', OP.plate));
267
-    		this.addRecipe(new QTArmor(6,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "DTD", "D D", "D D", 'D', OP.plateDouble, 'T', OP.plateTriple));
268
-    		this.addRecipe(new QTArmor(5,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "D D", "DTD", "PDP", 'D', OP.plateDouble, 'P', OP.plate, 'T', OP.plateTriple));
269
-    		this.addRecipe(new QTArmor(4,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "TDT", "D D", 'D', OP.plateDouble, 'T', OP.plateTriple));
270
-    		
271
-    		this.addRecipe(new QTArmor(3,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "L L", "CsC", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
272
-    		this.addRecipe(new QTArmor(2,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "CLC", "LsL", "L L", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
273
-    		this.addRecipe(new QTArmor(1,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "LsL", "CLC", "LLL", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
274
-    		this.addRecipe(new QTArmor(0,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "LLL", "LLL", "LsL", 'L', OreDictPrefix.get("link"), 's', "craftingToolSaw"));
275
-    	
276
-    		this.addRecipe(new RepairRecipe(QTI.qwerArmor.getItem(), null));
277
-    	}
278
-    	
279
-    	if (QTConfigs.enableTools)
280
-    	{
281
-    		this.addRecipe(new RepairRecipe(QTI.qwerTool.getItem(), null));
282
-    	}
283
-    	
284
-    	this.addRecipe(new RepairRecipe(CS.ToolsGT.sMetaTool, null));
285
-    	this.addRecipe(new RepairRecipe(Items.iron_axe, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
286
-    	this.addRecipe(new RepairRecipe(Items.iron_hoe, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
287
-    	//this.addRecipe(new RepairRecipe(Items.iron_horse_armor, new OreDictMaterialStack(MT.Fe, CS.U * 20)));
288
-    	this.addRecipe(new RepairRecipe(Items.iron_pickaxe, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
289
-    	this.addRecipe(new RepairRecipe(Items.iron_shovel, new OreDictMaterialStack(MT.Fe, CS.U)));
290
-    	this.addRecipe(new RepairRecipe(Items.iron_sword, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
291
-    	this.addRecipe(new RepairRecipe(Items.iron_boots, new OreDictMaterialStack(MT.Fe, CS.U * 4)));
292
-    	this.addRecipe(new RepairRecipe(Items.iron_chestplate, new OreDictMaterialStack(MT.Fe, CS.U * 8)));
293
-    	this.addRecipe(new RepairRecipe(Items.iron_helmet, new OreDictMaterialStack(MT.Fe, CS.U * 5)));
294
-    	this.addRecipe(new RepairRecipe(Items.iron_leggings, new OreDictMaterialStack(MT.Fe, CS.U * 7)));
295
-    	this.addRecipe(new RepairRecipe(Items.golden_axe, new OreDictMaterialStack(MT.Au, CS.U * 3)));
296
-    	this.addRecipe(new RepairRecipe(Items.golden_hoe, new OreDictMaterialStack(MT.Au, CS.U * 2)));
297
-    	this.addRecipe(new RepairRecipe(Items.golden_pickaxe, new OreDictMaterialStack(MT.Au, CS.U * 3)));
298
-    	this.addRecipe(new RepairRecipe(Items.golden_shovel, new OreDictMaterialStack(MT.Au, CS.U)));
299
-    	this.addRecipe(new RepairRecipe(Items.golden_sword, new OreDictMaterialStack(MT.Au, CS.U * 2)));
300
-    	this.addRecipe(new RepairRecipe(Items.golden_boots, new OreDictMaterialStack(MT.Au, CS.U * 4)));
301
-    	this.addRecipe(new RepairRecipe(Items.golden_chestplate, new OreDictMaterialStack(MT.Au, CS.U * 8)));
302
-    	this.addRecipe(new RepairRecipe(Items.golden_helmet, new OreDictMaterialStack(MT.Au, CS.U * 5)));
303
-    	this.addRecipe(new RepairRecipe(Items.golden_leggings, new OreDictMaterialStack(MT.Au, CS.U * 7)));
304
-    	//this.addRecipe(new RepairRecipe(Items.golden_horse_armor, new OreDictMaterialStack(MT.Au, CS.U * 20)));
305
-    	this.addRecipe(new RepairRecipe(Items.flint_and_steel, new OreDictMaterialStack(MT.Steel, CS.U / 9)));
306
-    	this.addRecipe(new RepairRecipe(Items.wooden_axe, new OreDictMaterialStack(MT.Wood, CS.U * 3)));
307
-    	this.addRecipe(new RepairRecipe(Items.wooden_hoe, new OreDictMaterialStack(MT.Wood, CS.U * 2)));
308
-    	this.addRecipe(new RepairRecipe(Items.wooden_pickaxe, new OreDictMaterialStack(MT.Wood, CS.U * 3)));
309
-    	this.addRecipe(new RepairRecipe(Items.wooden_shovel, new OreDictMaterialStack(MT.Wood, CS.U)));
310
-    	this.addRecipe(new RepairRecipe(Items.wooden_sword, new OreDictMaterialStack(MT.Wood, CS.U * 2)));
311
-    	this.addRecipe(new RepairRecipe(Items.chainmail_boots, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
312
-    	this.addRecipe(new RepairRecipe(Items.chainmail_chestplate, new OreDictMaterialStack(MT.Fe, CS.U * 7)));
313
-    	this.addRecipe(new RepairRecipe(Items.chainmail_helmet, new OreDictMaterialStack(MT.Fe, CS.U * 4)));
314
-    	this.addRecipe(new RepairRecipe(Items.chainmail_leggings, new OreDictMaterialStack(MT.Fe, CS.U * 6)));
315
-    	this.addRecipe(new RepairRecipe(Items.shears, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
316
-    }
317
-    
318
-    public ItemStack findMatchingRecipe(InventoryCrafting p_82787_1_, World p_82787_2_)
319
-    {
320
-        int j;
321
-        {
322
-            for (j = 0; j < this.recipes.size(); ++j)
323
-            {
324
-                IRecipe irecipe = (IRecipe)this.recipes.get(j);
325
-
326
-                if (irecipe.matches(p_82787_1_, p_82787_2_))
327
-                {
328
-                    return irecipe.getCraftingResult(p_82787_1_);
329
-                }
330
-            }
331
-
332
-            return null;
333
-        }
334
-    }
335
-
336
-    /**
337
-     * returns the List<> of all recipes
338
-     */
339
-    public List getRecipeList()
340
-    {
341
-        return this.recipes;
342
-    }
343
-    
344
-    public void addRecipe(IRecipe recipe)
345
-    {
346
-    	this.getRecipeList().add(recipe);
347
-    }
348
-
349
-	@Override
350
-	public void run() {
351
-		searchAndReplace();
352
-	}
353
-}
1
+package com.kbi.qwertech.api.recipe.managers;
2
+
3
+import com.kbi.qwertech.api.data.QTConfigs;
4
+import com.kbi.qwertech.api.data.QTI;
5
+import com.kbi.qwertech.api.recipe.HammerablePrefixRecipe;
6
+import com.kbi.qwertech.api.recipe.HammerableShapedRecipe;
7
+import com.kbi.qwertech.api.recipe.QTArmor;
8
+import com.kbi.qwertech.api.recipe.RepairRecipe;
9
+import gregapi.code.ICondition;
10
+import gregapi.config.ConfigCategories;
11
+import gregapi.data.CS;
12
+import gregapi.data.MT;
13
+import gregapi.data.OP;
14
+import gregapi.data.TD;
15
+import gregapi.oredict.OreDictManager;
16
+import gregapi.oredict.OreDictMaterialStack;
17
+import gregapi.oredict.OreDictPrefix;
18
+import gregapi.recipes.ICraftingRecipeGT;
19
+import gregapi.util.ST;
20
+import gregtech.loaders.b.Loader_OreProcessing;
21
+import net.minecraft.init.Items;
22
+import net.minecraft.inventory.InventoryCrafting;
23
+import net.minecraft.item.ItemStack;
24
+import net.minecraft.item.crafting.CraftingManager;
25
+import net.minecraft.item.crafting.IRecipe;
26
+import net.minecraft.item.crafting.ShapedRecipes;
27
+import net.minecraft.item.crafting.ShapelessRecipes;
28
+import net.minecraft.world.World;
29
+import net.minecraftforge.oredict.OreDictionary;
30
+import net.minecraftforge.oredict.ShapedOreRecipe;
31
+import net.minecraftforge.oredict.ShapelessOreRecipe;
32
+
33
+import java.util.ArrayList;
34
+import java.util.HashMap;
35
+import java.util.List;
36
+
37
+public class CraftingManagerHammer implements Runnable {
38
+
39
+	private static final CraftingManagerHammer instance = new CraftingManagerHammer();
40
+    /** A list of all the recipes added */
41
+    private List recipes = new ArrayList();
42
+    
43
+    public static HashMap<ItemStack, String> replacems = new HashMap<ItemStack, String>();
44
+
45
+    private static boolean hasRun = false;
46
+
47
+    /**
48
+     * Returns the static instance of this class
49
+     */
50
+    public static CraftingManagerHammer getInstance()
51
+    {
52
+        /* The static instance of this class */
53
+        return instance;
54
+    }
55
+
56
+    public static boolean replaceItems(IRecipe recipe, ArrayList items)
57
+	{
58
+		boolean removeIt = false;
59
+		for (int w = 0; w < items.size(); w++)
60
+		{
61
+			Object slot = items.get(w);
62
+			if (slot instanceof ItemStack)
63
+			{
64
+				ItemStack theSlot = (ItemStack)slot;
65
+				if (!(recipe instanceof ICraftingRecipeGT))
66
+				{
67
+					for (ItemStack key : replacems.keySet())
68
+					{
69
+						if (ST.equal(key, theSlot))
70
+						{
71
+							items.set(w, OreDictionary.getOres(replacems.get(key)));
72
+						}
73
+					}
74
+				}
75
+				if (OreDictManager.isItemStackInstanceOf(theSlot, "craftingToolHardHammer"))
76
+				{
77
+					items.remove(w);
78
+					removeIt = true;
79
+					w = w - 1;
80
+					break;
81
+				}
82
+			} else if (slot instanceof List && ((List)slot).size() > 0)
83
+			{
84
+				for (int q = 0; q < ((List)slot).size(); q++) {
85
+					ItemStack spot = (ItemStack) ((List) slot).get(q);
86
+					if (spot != null && OreDictManager.isItemStackInstanceOf(spot, "craftingToolHardHammer")) {
87
+						items.remove(w);
88
+						removeIt = true;
89
+						w = w - 1;
90
+						break;
91
+					}
92
+				}
93
+			}
94
+		}
95
+		return removeIt;
96
+	}
97
+
98
+	public static boolean replaceItems(int pos, IRecipe recipe, Object[] items)
99
+	{
100
+		boolean removeIt = false;
101
+		for (int w = 0; w < items.length; w++)
102
+		{
103
+			Object slot = items[w];
104
+			if (slot instanceof ItemStack)
105
+			{
106
+				ItemStack theSlot = (ItemStack)slot;
107
+				if (!(recipe instanceof ICraftingRecipeGT))
108
+				{
109
+					for (ItemStack key : replacems.keySet())
110
+					{
111
+						if (ST.equal(key, theSlot))
112
+						{
113
+							if (items instanceof ItemStack[])
114
+							{
115
+								System.out.println("Attempting to replace recipe for " + recipe.getRecipeOutput());
116
+								ShapedRecipes sr = (ShapedRecipes)recipe;
117
+								Object[] inputs = new Object[sr.recipeHeight + 2];
118
+								for (int y = 0; y < sr.recipeHeight; y++)
119
+								{
120
+									inputs[y] = (sr.recipeWidth == 1 ? "X" : sr.recipeWidth == 2 ? "XX" : sr.recipeWidth == 3 ? "XXX" : "");
121
+								}
122
+								inputs[inputs.length - 2] = 'X';
123
+								inputs[inputs.length - 1] = sr.getRecipeOutput();
124
+								ShapedOreRecipe sor = new ShapedOreRecipe(recipe.getRecipeOutput(), inputs);
125
+								Object[] oldInputs = sor.getInput();
126
+								for (int y = 0; y < oldInputs.length; y++)
127
+								{
128
+									oldInputs[y] = items[y];
129
+								}
130
+								oldInputs[w] = OreDictionary.getOres(replacems.get(key));
131
+								CraftingManager.getInstance().getRecipeList().set(pos, sor);
132
+							} else {
133
+								items[w] = OreDictionary.getOres(replacems.get(key));
134
+							}
135
+						}
136
+					}
137
+				}
138
+				if (OreDictManager.isItemStackInstanceOf(theSlot, "craftingToolHardHammer"))
139
+				{
140
+					items[w] = null;
141
+					removeIt = true;
142
+				}
143
+			} else if (slot instanceof List)
144
+			{
145
+
146
+				for (int q = 0; q < ((List)slot).size(); q++) {
147
+					ItemStack spot = (ItemStack) ((List) slot).get(q);
148
+					if (OreDictManager.isItemStackInstanceOf(spot, "craftingToolHardHammer")) {
149
+						items[w] = null;
150
+						removeIt = true;
151
+						break;
152
+					}
153
+				}
154
+			}
155
+		}
156
+		return removeIt;
157
+	}
158
+    
159
+    public static void searchAndReplace()
160
+    {
161
+    	if (QTConfigs.allHammers && !hasRun)
162
+    	{
163
+			List oldRecipes = CraftingManager.getInstance().getRecipeList();
164
+			System.out.println("Parsing through " + oldRecipes.size() + " recipes to remove hammers...");
165
+	    	int count = 0;
166
+	    	int shapeless = 0;
167
+	    	for (int q = 0; q < oldRecipes.size(); q++)
168
+	    	{
169
+	    		try {
170
+					boolean removelIt = false;
171
+					IRecipe recipe = (IRecipe)oldRecipes.get(q);
172
+					if (recipe instanceof ShapelessOreRecipe) {
173
+						ArrayList items = ((ShapelessOreRecipe) recipe).getInput();
174
+						removelIt = replaceItems(recipe, items);
175
+					} else if (recipe instanceof ShapedOreRecipe) {
176
+						Object[] items = ((ShapedOreRecipe) recipe).getInput();
177
+						removelIt = replaceItems(q, recipe, items);
178
+					} else if (recipe instanceof ShapedRecipes) {
179
+						ItemStack[] items = ((ShapedRecipes) recipe).recipeItems;
180
+						removelIt = replaceItems(q, recipe, items);
181
+					} else if (recipe instanceof ShapelessRecipes) {
182
+						ShapelessRecipes shrp = (ShapelessRecipes)recipe;
183
+						Object[] obs = shrp.recipeItems.toArray();
184
+						ShapelessOreRecipe shor = new ShapelessOreRecipe(shrp.getRecipeOutput(), obs);
185
+						oldRecipes.set(q, shor);
186
+						shapeless = shapeless + 1;
187
+						removelIt = replaceItems(q, shor, obs);
188
+					}
189
+					if (removelIt) {
190
+						instance.addRecipe(recipe);
191
+						oldRecipes.remove(recipe);
192
+						count = count + 1;
193
+						q = q - 1;
194
+					}
195
+				} catch (Throwable t) {
196
+	    			System.out.println("Exception found!");
197
+	    			t.printStackTrace();
198
+	    			System.out.println("Caused by:");
199
+					t.getCause().printStackTrace();
200
+				}
201
+	    	}
202
+	    	System.out.println("Parsing complete, found " + count + " hammer recipes and made " + shapeless + " shapeless recipes oredict friendly");
203
+    	} else {
204
+			if (QTConfigs.anyHammers) {
205
+				String tCategory = ConfigCategories.Recipes.gregtechrecipes + ".";
206
+				//OP.ingotDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotDouble", new String[][]{{"h", "I", "I"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
207
+				//OP.ingotTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotTriple", new String[][]{{"h", "I", "X"}}, OP.ingotDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
208
+				//OP.ingotQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotQuadruple", new String[][]{{"h", "I", "X"}}, OP.ingotTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
209
+				//OP.ingotQuintuple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2ingotQuintuple", new String[][]{{"h", "I", "X"}}, OP.ingotQuadruple, null, null,null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
210
+				//OP.plateTiny.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "chunkGt2plateTiny", new String[][]{{"h", "X"}}, OP.chunkGt, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
211
+				//OP.plate.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plateCurved2plate", new String[][]{{"h", "X"}}, OP.plateCurved, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
212
+				//OP.plate.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plate", new String[][]{{"h", "X"}}, OP.ingotDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
213
+				//OP.plateDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateDouble", new String[][]{{"h", "X"}}, OP.ingotTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
214
+				//OP.plateTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateTriple", new String[][]{{"h", "X"}}, OP.ingotQuadruple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
215
+				//OP.plateQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateQuadruple", new String[][]{{"h", "X"}}, OP.ingotQuintuple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
216
+				//OP.plateDouble.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "ingots2plateDouble", new String[][]{{"h", "P", "P"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
217
+				//OP.plateTriple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateTriple", new String[][]{{"h", "P", "X"}}, OP.plateDouble, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
218
+				//OP.plateQuadruple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateQuadruple", new String[][]{{"h", "P", "X"}}, OP.plateTriple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
219
+				//OP.plateQuintuple.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plates2plateQuintuple", new String[][]{{"h", "P", "X"}}, OP.plateQuadruple, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
220
+				//OP.plateCurved.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plate2plateCurved", new String[][]{{"h", "P", "z"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
221
+				OP.ring.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2ring", new String[][]{{"hS", " o"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
222
+				OP.spring.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2spring", new String[][]{{"zXh"}}, OP.stickLong, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
223
+				OP.springSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "wire2springSmall", new String[][]{{"oXh"}}, OP.wireGt01, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
224
+				OP.springSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "stick2springSmall", new String[][]{{"oSh"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
225
+				OP.foil.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(2L, tCategory + "plate2foil", new String[][]{{"hPz"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE)));
226
+				OP.casingSmall.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "plate2casingSmall", new String[][]{{"h P"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
227
+				OP.stickLong.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "sticks2stickLong", new String[][]{{"ShS"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
228
+				OP.rotor.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "rotor", new String[][]{{"YhY", "TXf", "YdY"}}, OP.ring, OP.plateCurved, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE)));
229
+				OP.toolHeadBuzzSaw.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "toolHeadBuzzSaw", new String[][]{{"wPh", "P P", "fPx"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT)));
230
+				OP.toolHeadBuzzSaw.addListener(new Loader_OreProcessing.OreProcessing_CraftFrom(1L, tCategory + "toolHeadBuzzSaw", new String[][]{{"wCh", "C C", "fCx"}}, null, null, null, null, null, new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT)));
231
+			}
232
+		}
233
+    }
234
+
235
+    private CraftingManagerHammer() {
236
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingot, 			OP.ingot}					).setVertical());
237
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingot, 			OP.ingot, 		OP.ingot}	).setVertical());
238
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingot}					).setVertical());
239
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingot}					).setVertical());
240
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingot, 		OP.ingot}	).setVertical());
241
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingotDouble}				).setVertical());
242
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingotDouble}				).setVertical());
243
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple, 	OP.ingot, 		OP.ingot}	).setVertical());
244
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuadruple, OP.ingot}					).setVertical());
245
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ingotQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble, 	OP.ingotDouble, OP.ingot}	).setVertical());
246
+    	
247
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plate,  			new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotDouble}								));
248
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotTriple}								));
249
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuadruple}								));
250
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.ingotQuintuple}								));
251
+    	
252
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateDouble,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plate, 			OP.plate}					).setVertical());
253
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plate, 			OP.plate, 		OP.plate}	).setVertical());
254
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTriple,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plate}					).setVertical());
255
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plate}					).setVertical());
256
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plate, OP.plate}			).setVertical());
257
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuadruple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plateDouble}				).setVertical());
258
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plateDouble}				).setVertical());
259
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateTriple, 	OP.plate, OP.plate}			).setVertical());
260
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateQuadruple, OP.plate}					).setVertical());
261
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateQuintuple,  	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new Object[]{OP.plateDouble, 	OP.plateDouble, OP.plate}	).setVertical());
262
+    	
263
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plate,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plateCurved}));
264
+    	//this.addRecipe(new HammerablePrefixRecipe(OP.foil,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate},		 	"craftingToolBendingCylinder").setHorizontal());
265
+    	//this.addRecipe(new HammerablePrefixRecipe(OP.plateCurved,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate},		 	"craftingToolBendingCylinder").setVertical());
266
+    	this.addRecipe(new HammerablePrefixRecipe(OP.ring,		  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick}, 		"craftingToolBendingCylinderSmall").setVertical());
267
+    	this.addRecipe(new HammerablePrefixRecipe(OP.spring, 	 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stickLong}, 	"craftingToolBendingCylinder").setHorizontal());
268
+    	this.addRecipe(new HammerablePrefixRecipe(OP.springSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.wireGt01}, 		"craftingToolBendingCylinderSmall").setHorizontal());
269
+    	this.addRecipe(new HammerablePrefixRecipe(OP.springSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick}, 		"craftingToolBendingCylinderSmall").setHorizontal());
270
+    	this.addRecipe(new HammerablePrefixRecipe(OP.casingSmall,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.plate}));
271
+    	this.addRecipe(new HammerablePrefixRecipe(OP.plateTiny,  		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.nugget}));
272
+    	this.addRecipe(new HammerablePrefixRecipe(OP.stickLong, 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 							new Object[]{OP.stick,			OP.stick}					));
273
+
274
+    	this.addRecipe(new HammerableShapedRecipe(OP.foil,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"Pb"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
275
+		this.addRecipe(new HammerableShapedRecipe(OP.foil,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"bP"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
276
+    	this.addRecipe(new HammerableShapedRecipe(OP.plateCurved,		new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),							new String[]{"P", "b"}, 'P', OP.plate, 'b', "craftingToolBendingCylinder"));
277
+
278
+		this.addRecipe(new HammerableShapedRecipe(OP.rotor,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"Y Y", "TXf", "YdY"}, 'Y', OP.plateCurved, 'X', OP.ring, 'T', OP.screw, 'f', "craftingToolFile", 'd', "craftingToolScrewdriver"));
279
+    	
280
+    	this.addRecipe(new HammerableShapedRecipe(OP.toolHeadBuzzSaw,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"wP ", "P P", "fPx"}, 'P', OP.plate, 'x', "craftingToolWireCutter", 'f', "craftingToolFile", 'w', "craftingToolWrench"));
281
+    	this.addRecipe(new HammerableShapedRecipe(OP.toolHeadBuzzSaw,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Compounds.COATED.NOT, TD.Processing.SMITHABLE), new String[]{"wC ", "C C", "fCx"}, 'C', OP.plateGem, 'x', "craftingToolWireCutter", 'f', "craftingToolFile", 'w', "craftingToolWrench"));
282
+    	
283
+    	this.addRecipe(new HammerablePrefixRecipe(OP.gemExquisite, 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemLegendary}					));
284
+    	this.addRecipe(new HammerablePrefixRecipe(OP.gemFlawless, 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemExquisite}					));
285
+    	this.addRecipe(new HammerablePrefixRecipe(OP.gem,			 2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemFlawless}					));
286
+    	this.addRecipe(new HammerablePrefixRecipe(OP.gemFlawed,	 	2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gem}							));
287
+    	this.addRecipe(new HammerablePrefixRecipe(OP.gemChipped, 	2,	new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemFlawed}						));
288
+    	this.addRecipe(new HammerablePrefixRecipe(OP.dustSmall, 		new ICondition.And(TD.Atomic.ANTIMATTER.NOT), 													new Object[]{OP.gemChipped}						));
289
+    	
290
+    	//this.addRecipe(new HammerablePrefixRecipe(OreDictPrefix.get("link"),new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE),						new Object[]{OP.ring}							));
291
+    	this.addRecipe(new HammerablePrefixRecipe(OreDictPrefix.get("chain"),new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), 					new Object[]{OP.stick, OP.stick, OP.stick, OP.stick}, "craftingToolBendingCylinderSmall"));
292
+    	
293
+    	if (QTConfigs.enableArmor)
294
+    	{
295
+    		this.addRecipe(new QTArmor(7,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "D D", "P P", 'D', OP.plateDouble, 'P', OP.plate));
296
+    		this.addRecipe(new QTArmor(6,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "DTD", "D D", "D D", 'D', OP.plateDouble, 'T', OP.plateTriple));
297
+    		this.addRecipe(new QTArmor(5,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "D D", "DTD", "PDP", 'D', OP.plateDouble, 'P', OP.plate, 'T', OP.plateTriple));
298
+    		this.addRecipe(new QTArmor(4,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "TDT", "D D", 'D', OP.plateDouble, 'T', OP.plateTriple));
299
+    		
300
+    		this.addRecipe(new QTArmor(3,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "L L", "CsC", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
301
+    		this.addRecipe(new QTArmor(2,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "CLC", "LsL", "L L", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
302
+    		this.addRecipe(new QTArmor(1,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "LsL", "CLC", "LLL", 'L', OreDictPrefix.get("link"), 'C', OreDictPrefix.get("chain"), 's', "craftingToolSaw"));
303
+    		this.addRecipe(new QTArmor(0,				new ICondition.And(TD.Atomic.ANTIMATTER.NOT, TD.Processing.SMITHABLE), "LLL", "LLL", "LsL", 'L', OreDictPrefix.get("link"), 's', "craftingToolSaw"));
304
+    	
305
+    		this.addRecipe(new RepairRecipe(QTI.qwerArmor.getItem(), null));
306
+    	}
307
+    	
308
+    	if (QTConfigs.enableTools)
309
+    	{
310
+    		this.addRecipe(new RepairRecipe(QTI.qwerTool.getItem(), null));
311
+    	}
312
+    	
313
+    	this.addRecipe(new RepairRecipe(CS.ToolsGT.sMetaTool, null));
314
+    	this.addRecipe(new RepairRecipe(Items.iron_axe, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
315
+    	this.addRecipe(new RepairRecipe(Items.iron_hoe, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
316
+    	//this.addRecipe(new RepairRecipe(Items.iron_horse_armor, new OreDictMaterialStack(MT.Fe, CS.U * 20)));
317
+    	this.addRecipe(new RepairRecipe(Items.iron_pickaxe, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
318
+    	this.addRecipe(new RepairRecipe(Items.iron_shovel, new OreDictMaterialStack(MT.Fe, CS.U)));
319
+    	this.addRecipe(new RepairRecipe(Items.iron_sword, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
320
+    	this.addRecipe(new RepairRecipe(Items.iron_boots, new OreDictMaterialStack(MT.Fe, CS.U * 4)));
321
+    	this.addRecipe(new RepairRecipe(Items.iron_chestplate, new OreDictMaterialStack(MT.Fe, CS.U * 8)));
322
+    	this.addRecipe(new RepairRecipe(Items.iron_helmet, new OreDictMaterialStack(MT.Fe, CS.U * 5)));
323
+    	this.addRecipe(new RepairRecipe(Items.iron_leggings, new OreDictMaterialStack(MT.Fe, CS.U * 7)));
324
+    	this.addRecipe(new RepairRecipe(Items.golden_axe, new OreDictMaterialStack(MT.Au, CS.U * 3)));
325
+    	this.addRecipe(new RepairRecipe(Items.golden_hoe, new OreDictMaterialStack(MT.Au, CS.U * 2)));
326
+    	this.addRecipe(new RepairRecipe(Items.golden_pickaxe, new OreDictMaterialStack(MT.Au, CS.U * 3)));
327
+    	this.addRecipe(new RepairRecipe(Items.golden_shovel, new OreDictMaterialStack(MT.Au, CS.U)));
328
+    	this.addRecipe(new RepairRecipe(Items.golden_sword, new OreDictMaterialStack(MT.Au, CS.U * 2)));
329
+    	this.addRecipe(new RepairRecipe(Items.golden_boots, new OreDictMaterialStack(MT.Au, CS.U * 4)));
330
+    	this.addRecipe(new RepairRecipe(Items.golden_chestplate, new OreDictMaterialStack(MT.Au, CS.U * 8)));
331
+    	this.addRecipe(new RepairRecipe(Items.golden_helmet, new OreDictMaterialStack(MT.Au, CS.U * 5)));
332
+    	this.addRecipe(new RepairRecipe(Items.golden_leggings, new OreDictMaterialStack(MT.Au, CS.U * 7)));
333
+    	//this.addRecipe(new RepairRecipe(Items.golden_horse_armor, new OreDictMaterialStack(MT.Au, CS.U * 20)));
334
+    	this.addRecipe(new RepairRecipe(Items.flint_and_steel, new OreDictMaterialStack(MT.Steel, CS.U / 9)));
335
+    	this.addRecipe(new RepairRecipe(Items.wooden_axe, new OreDictMaterialStack(MT.Wood, CS.U * 3)));
336
+    	this.addRecipe(new RepairRecipe(Items.wooden_hoe, new OreDictMaterialStack(MT.Wood, CS.U * 2)));
337
+    	this.addRecipe(new RepairRecipe(Items.wooden_pickaxe, new OreDictMaterialStack(MT.Wood, CS.U * 3)));
338
+    	this.addRecipe(new RepairRecipe(Items.wooden_shovel, new OreDictMaterialStack(MT.Wood, CS.U)));
339
+    	this.addRecipe(new RepairRecipe(Items.wooden_sword, new OreDictMaterialStack(MT.Wood, CS.U * 2)));
340
+    	this.addRecipe(new RepairRecipe(Items.chainmail_boots, new OreDictMaterialStack(MT.Fe, CS.U * 3)));
341
+    	this.addRecipe(new RepairRecipe(Items.chainmail_chestplate, new OreDictMaterialStack(MT.Fe, CS.U * 7)));
342
+    	this.addRecipe(new RepairRecipe(Items.chainmail_helmet, new OreDictMaterialStack(MT.Fe, CS.U * 4)));
343
+    	this.addRecipe(new RepairRecipe(Items.chainmail_leggings, new OreDictMaterialStack(MT.Fe, CS.U * 6)));
344
+    	this.addRecipe(new RepairRecipe(Items.shears, new OreDictMaterialStack(MT.Fe, CS.U * 2)));
345
+    }
346
+    
347
+    public ItemStack findMatchingRecipe(InventoryCrafting p_82787_1_, World p_82787_2_)
348
+    {
349
+        int j;
350
+        {
351
+            for (j = 0; j < this.recipes.size(); ++j)
352
+            {
353
+                IRecipe irecipe = (IRecipe)this.recipes.get(j);
354
+
355
+                if (irecipe.matches(p_82787_1_, p_82787_2_))
356
+                {
357
+                    return irecipe.getCraftingResult(p_82787_1_);
358
+                }
359
+            }
360
+
361
+            return null;
362
+        }
363
+    }
364
+
365
+    /**
366
+     * returns the List<> of all recipes
367
+     */
368
+    public List getRecipeList()
369
+    {
370
+        return this.recipes;
371
+    }
372
+    
373
+    public void addRecipe(IRecipe recipe)
374
+    {
375
+    	this.getRecipeList().add(recipe);
376
+    }
377
+
378
+	@Override
379
+	public void run() {
380
+		searchAndReplace();
381
+	}
382
+}

Loading…
Cancel
Save