From 311ab89f93558233a40079f7cb16605b141b5346 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:38:06 +0100 Subject: Move sources and resources --- .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 264 --------------------- 1 file changed, 264 deletions(-) delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java deleted file mode 100644 index ea129a2b0e..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ /dev/null @@ -1,264 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders; - -import java.util.HashSet; -import java.util.Set; - -import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.interfaces.RunnableWithInfo; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; -import net.minecraft.item.ItemStack; - -public class RecipeGen_ShapedCrafting extends RecipeGen_Base { - - public final static Set> mRecipeGenMap = new HashSet>(); - static { - MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); - } - - public RecipeGen_ShapedCrafting(final Material M){ - this.toGenerate = M; - mRecipeGenMap.add(this); - } - - @Override - public void run() { - generateRecipes(this.toGenerate); - } - - private void generateRecipes(final Material material){ - Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO - - if (!CORE.GTNH) { - //Nuggets - if (ItemUtils.checkForInvalidItems(material.getNugget(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getIngot(1), - new Object[]{ - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1) - }); - } - - //Plates - - //Single Plate Shaped/Shapeless - if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - if (material.getPlate(1) != null && material.getIngot(1) != null) - GT_ModHandler.addCraftingRecipe( - material.getPlate(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"h", "B", "I", - Character.valueOf('I'), - material.getIngot(1), - Character.valueOf('B'), - material.getIngot(1)}); - - if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlate(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getIngot(1), - material.getIngot(1)}); - - //Double Plate Shaped/Shapeless - if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - GT_ModHandler.addCraftingRecipe( - material.getPlateDouble(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"I", "B", "h", - Character.valueOf('I'), - material.getPlate(1), - Character.valueOf('B'), - material.getPlate(1)}); - - if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlateDouble(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getPlate(1), - material.getPlate(1)}); - - //Ring Recipe - if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getRing(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { - if (CORE.GTNH){ - if (RecipeUtils.addShapedRecipe( - "craftingToolHardHammer", null, null, - "craftingToolFile", material.getRod(1), null, - null, null, null, - material.getRing(1))){ - Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - else { - if (RecipeUtils.addShapedRecipe( - "craftingToolHardHammer", null, null, - null, material.getRod(1), null, - null, null, null, - material.getRing(1))){ - Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - } - - - //Framebox Recipe - if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFrameBox(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { - final ItemStack stackStick = material.getRod(1); - if (RecipeUtils.addShapedRecipe( - stackStick, stackStick, stackStick, - stackStick, "craftingToolWrench", stackStick, - stackStick, stackStick, stackStick, - material.getFrameBox(2))){ - Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Failed"); - } - } - - - /*final int tVoltageMultiplier = material.getMeltingPointK() >= 1600 ? 60 : 15; - - - //Add a shapeless recipe for each dust this way - Compat mode. - ItemStack[] inputStacks = material.getMaterialComposites(); - ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - - if (inputStacks.length > 0 && tVoltageMultiplier == 15){ - Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); - long[] inputStackSize = material.vSmallestRatio; - if (inputStackSize != null){ - for (short x=0;x