Browse Source

Wood Handles should no longer spam the Handler

Gregorius Techneticies 3 months ago
parent
commit
5b71b5fea6
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 1B693EA14F2FD70F

+ 1
- 0
CHANGELOG.md View File

@@ -23,6 +23,7 @@ I made sure all Ores actually work. Realgar (Red Gem Ore made of Arsenic + Sulfu
23 23
 [CHANGED] Air Vents now do 256000L per 360 ticks at a time, instead of only 16000. They have an Offset for ticking too now, so you can use multiple Vents on one Pipe/Drum/etc now.
24 24
 [CHANGED] There is now more Galena Veins in the World, and visible on the Surface in Mountains.
25 25
 [CHANGED] A bunch of Ores, that I deemed way too useless years ago, has been added back. None of them are required for anything, old Worlds are safe as always. ;)
26
+[ADDED] NEI Handler for putting Toolheads on Handles. I used the Machine Recipe Handler and Fake Recipes for that one.
26 27
 [ADDED] Arsenic can now be used to make Poison and Harming Potions.
27 28
 [ADDED] Crushed Purified Biotite can now be heated in the Dryer to make Argon Gas from it. It is mostly a Byproduct of other Ores like Asbestos though,
28 29
 [ADDED] Gypsum, Trona and Mirabilite now have Recipes to create them by mixing some Chemicals with Water (They can be dried back too). Perlite now has a drying Recipe that turns it into Obsidian aswell.

+ 5
- 1
src/main/java/gregapi/data/RM.java View File

@@ -65,7 +65,7 @@ public class RM {
65 65
 	, BumbleQueens              = new RecipeMap                     (null, "gt.recipe.bumblequeen"                  , "Bumblebee Queen"                 , null, 0, 1, RES_PATH_GUI+"machines/Default"                   ,/*IN-OUT-MIN-ITEM=*/ 2, 6, 0,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 1,/*AMP=*/ 1, ""                    ,    1, ""      , F, T, F, T, F, T, T)
66 66
 	, Trees                     = new RecipeMap                     (null, "gt.recipe.trees"                        , "Family Tree"                     , null, 0, 1, RES_PATH_GUI+"machines/FamilyTree"                ,/*IN-OUT-MIN-ITEM=*/ 2,12, 0,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 1,/*AMP=*/ 1, ""                    ,    1, ""      , F, T, F, F, F, T, T)
67 67
 	, Other                     = new RecipeMap                     (null, "gt.recipe.other"                        , "Other Relations"                 , null, 0, 1, RES_PATH_GUI+"machines/Default"                   ,/*IN-OUT-MIN-ITEM=*/ 6, 6, 0,/*IN-OUT-MIN-FLUID=*/ 3, 3, 0,/*MIN*/ 1,/*AMP=*/ 1, ""                    ,    1, ""      , F, T, F, F, F, F, F)
68
-	, ToolHeads                 = new RecipeMap                     (null, "gt.recipe.toolhead"                     , "Craft Toolhead onto Handle"      , null, 0, 1, RES_PATH_GUI+"machines/Crafting2By2"              ,/*IN-OUT-MIN-ITEM=*/ 4, 1, 0,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 0,/*AMP=*/ 0, ""                    ,    1, ""      , F, T, F, F, F, F, F)
68
+	, ToolHeads                 = new RecipeMap                     (null, "gt.recipe.toolhead"                     , "Craft Toolhead on Handle"        , null, 0, 1, RES_PATH_GUI+"machines/Crafting2By2"              ,/*IN-OUT-MIN-ITEM=*/ 4, 1, 0,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 0,/*AMP=*/ 0, ""                    ,    1, ""      , F, T, F, F, F, F, F)
69 69
 	
70 70
 	, Generifier                = new RecipeMap                     (null, "gt.recipe.generifier"                   , "Generifier"                      , null, 0, 1, RES_PATH_GUI+"machines/Generifier"                ,/*IN-OUT-MIN-ITEM=*/ 1, 1, 0,/*IN-OUT-MIN-FLUID=*/ 1, 1, 0,/*MIN*/ 1,/*AMP=*/ 1, ""                    ,    1, ""      , T, T, T, T, F, F, F)
71 71
 	, Boxinator                 = new RecipeMap                     (null, "gt.recipe.boxinator"                    , "Boxinator"                       , null, 0, 1, RES_PATH_GUI+"machines/Boxinator"                 ,/*IN-OUT-MIN-ITEM=*/ 2, 1, 2,/*IN-OUT-MIN-FLUID=*/ 0, 0, 0,/*MIN*/ 0,/*AMP=*/ 1, ""                    ,    1, ""      , T, T, T, T, F, T, T)
@@ -155,6 +155,10 @@ public class RM {
155 155
 		RecipeMap.sSluiceRecipes=Sluice;RecipeMap.sMagneticSeparatorRecipes=MagneticSeparator;RecipeMap.sAutocrafterRecipes=Autocrafter;RecipeMap.sMassfabRecipes=Massfab;RecipeMap.sScannerMolecularRecipes=ScannerMolecular;RecipeMap.sReplicatorRecipes=Replicator;RecipeMap.sSlicerRecipes=Slicer;RecipeMap.sCokeOvenRecipes=CokeOven;
156 156
 		RecipeMap.sDistillationTowerRecipes=DistillationTower;RecipeMap.sAutoclaveRecipes=Autoclave;RecipeMap.sBoxinatorRecipes=Boxinator;RecipeMap.sUnboxinatorRecipes=Unboxinator;RecipeMap.sFusionRecipes=Fusion;RecipeMap.sBlastRecipes=BlastFurnace;RecipeMap.sImplosionRecipes=ImplosionCompressor;RecipeMap.sVacuumRecipes=VacuumFreezer;
157 157
 		RecipeMap.sAssemblerRecipes=Assembler;RecipeMap.sCNCRecipes=CNC;RecipeMap.sFuelsBurn=FM.Burn;RecipeMap.sFuelsGas=FM.Gas;RecipeMap.sFuelsHot=FM.Hot;RecipeMap.sFuelsPlasma=FM.Plasma;RecipeMap.sFuelsEngine=FM.Engine;RecipeMap.sFuelsTurbine=FM.Turbine;RecipeMap.sFuelsMagic=FM.Magic;
158
+		
159
+		Furnace.mRecipeMachineList.add(ST.make(Blocks.furnace, 1, W));
160
+		Furnace.mRecipeMachineList.add(ST.make(Blocks.lit_furnace, 1, W));
161
+		ToolHeads.mRecipeMachineList.add(ST.make(Blocks.crafting_table, 1, W));
158 162
 	}
159 163
 	
160 164
 	public static boolean generify(ItemStack aStack1, ItemStack aStack2) {

+ 14
- 8
src/main/java/gregapi/recipes/AdvancedCraftingTool.java View File

@@ -22,7 +22,9 @@ package gregapi.recipes;
22 22
 import static gregapi.data.CS.*;
23 23
 
24 24
 import gregapi.code.ICondition;
25
+import gregapi.data.ANY;
25 26
 import gregapi.data.CS.ToolsGT;
27
+import gregapi.data.IL;
26 28
 import gregapi.data.MT;
27 29
 import gregapi.data.OP;
28 30
 import gregapi.data.RM;
@@ -70,14 +72,18 @@ public class AdvancedCraftingTool extends ShapelessOreRecipe implements ICraftin
70 72
 	@Override
71 73
 	public void onOreRegistration(OreDictRegistrationContainer aEvent) {
72 74
 		if (mCondition.isTrue(aEvent.mMaterial)) {
73
-			if (!aEvent.mMaterial.mHandleMaterial.contains(TD.Properties.INVALID_MATERIAL)) {
74
-				ItemStack tHandle = OP.stick.mat(aEvent.mMaterial.mHandleMaterial, 1);
75
-				if (ST.valid(tHandle)) RM.ToolHeads.addRecipeX(F,F,T,F,F, 0, 0, ST.array(aEvent.mStack, NI, tHandle), mTool.getToolWithStats(mToolID, aEvent.mMaterial, aEvent.mMaterial.mHandleMaterial));
76
-			}
77
-			for (OreDictMaterial tHandleMaterial : aEvent.mMaterial.mHandleMaterial.mToThis)
78
-			if (!tHandleMaterial                 .contains(TD.Properties.INVALID_MATERIAL)) {
79
-				ItemStack tHandle = OP.stick.mat(tHandleMaterial                 , 1);
80
-				if (ST.valid(tHandle)) RM.ToolHeads.addRecipeX(F,F,T,F,F, 0, 0, ST.array(aEvent.mStack, NI, tHandle), mTool.getToolWithStats(mToolID, aEvent.mMaterial, tHandleMaterial));
75
+			if (aEvent.mMaterial.mHandleMaterial == ANY.Wood) {
76
+				RM.ToolHeads.addRecipeX(F,F,T,F,F, 0, 0, ST.array(aEvent.mStack, NI, IL.Stick.get(1)), mTool.getToolWithStats(mToolID, aEvent.mMaterial, aEvent.mMaterial.mHandleMaterial));
77
+			} else {
78
+				if (!aEvent.mMaterial.mHandleMaterial.contains(TD.Properties.INVALID_MATERIAL)) {
79
+					ItemStack tHandle = OP.stick.mat(aEvent.mMaterial.mHandleMaterial, 1);
80
+					if (ST.valid(tHandle)) RM.ToolHeads.addRecipeX(F,F,T,F,F, 0, 0, ST.array(aEvent.mStack, NI, tHandle), mTool.getToolWithStats(mToolID, aEvent.mMaterial, aEvent.mMaterial.mHandleMaterial));
81
+				}
82
+				for (OreDictMaterial tHandleMaterial : aEvent.mMaterial.mHandleMaterial.mToThis)
83
+				if (!tHandleMaterial                 .contains(TD.Properties.INVALID_MATERIAL)) {
84
+					ItemStack tHandle = OP.stick.mat(tHandleMaterial                 , 1);
85
+					if (ST.valid(tHandle)) RM.ToolHeads.addRecipeX(F,F,T,F,F, 0, 0, ST.array(aEvent.mStack, NI, tHandle), mTool.getToolWithStats(mToolID, aEvent.mMaterial, tHandleMaterial));
86
+				}
81 87
 			}
82 88
 		}
83 89
 	}

Loading…
Cancel
Save