diff --git a/README.md b/README.md index 663c196..e29697a 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ This mod removes that functionality and allows the player to use NEI's transfer - [x] Thaumcraft NEI Plugin - [x] Thaumic Energistics(Allows you to transfer ArcaneRecipe from NEI to Knowledge Inscriber, it requires Thaumcraft NEI Plugin) - [x] ThermalExpansion +- [x] ImmersiveEngineering +- [x] Mekanism +- [x] BloodMagic If you want other Mod support,see [RecipeProcessor](./src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java) and [Mod support Issue](https://github.com/vfyjxf/NotEnoughEnergistics/issues/1) diff --git a/READNE_CN.md b/READNE_CN.md index 95f583c..c4d1613 100644 --- a/READNE_CN.md +++ b/READNE_CN.md @@ -25,6 +25,9 @@ NotEnoughEnergistics 是[Just Enough Energistics](https://www.curseforge.com/min - [x] Thaumcraft NEI Plugin - [x] Thaumic Energistics(允许你从NEI转移奥术合成台配方到知识记录仪,需要Thaumcraft NEI Plugin) - [x] ThermalExpansion +- [x] ImmersiveEngineering +- [x] Mekanism +- [x] BloodMagic 如果你想要别的Mod的支持,请看[RecipeProcessor](./src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java) 或者[模组支持处理区](https://github.com/vfyjxf/NotEnoughEnergistics/issues/1) diff --git a/gradle.properties b/gradle.properties index be0e868..4e6fb7a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon=false mc_version=1.7.10 nei_version=2.1.6-GTNH ae2_version=rv3-beta-52-GTNH -mod_version=1.2.2 +mod_version=1.2.3 forge_version=10.13.4.1614 mod_group=com.github.vfyjxf.neenergistics mod_id=neenergistics diff --git a/libs/BloodMagic-1.7.10-1.3.3-44-deobf.jar b/libs/BloodMagic-1.7.10-1.3.3-44-deobf.jar new file mode 100644 index 0000000..2be358c Binary files /dev/null and b/libs/BloodMagic-1.7.10-1.3.3-44-deobf.jar differ diff --git a/libs/BloodMagic-1.7.10-1.3.3-44-sources.jar b/libs/BloodMagic-1.7.10-1.3.3-44-sources.jar new file mode 100644 index 0000000..ad87a98 Binary files /dev/null and b/libs/BloodMagic-1.7.10-1.3.3-44-sources.jar differ diff --git a/libs/ImmersiveEngineering-0.7.7-deobf.jar b/libs/ImmersiveEngineering-0.7.7-deobf.jar new file mode 100644 index 0000000..13fce96 Binary files /dev/null and b/libs/ImmersiveEngineering-0.7.7-deobf.jar differ diff --git a/libs/Mekanism-1.7.10-9.1.1.1031.jar b/libs/Mekanism-1.7.10-9.1.1.1031.jar new file mode 100644 index 0000000..68e5c4f Binary files /dev/null and b/libs/Mekanism-1.7.10-9.1.1.1031.jar differ diff --git a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java index 420d989..6142dd2 100644 --- a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java @@ -75,10 +75,11 @@ public class NEECraftingHandler implements IOverlayHandler { } for (PositionedStack positionedStack : tInputs) { - ItemStack currentStack = positionedStack.item; + ItemStack currentStack = positionedStack.items[0]; for (ItemStack stack : positionedStack.items) { if (Platform.isRecipePrioritized(stack) || ItemUtils.isPreferItems(stack, recipeProcessorId, identifier)) { currentStack = stack.copy(); + currentStack.stackSize = positionedStack.items[0].stackSize; break; } } diff --git a/src/main/java/com/github/vfyjxf/nee/processor/BloodMagicRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/BloodMagicRecipeProcessor.java new file mode 100644 index 0000000..31ff2b6 --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/processor/BloodMagicRecipeProcessor.java @@ -0,0 +1,48 @@ +package com.github.vfyjxf.nee.processor; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.IRecipeHandler; + +import java.util.*; + +/** + * @author vfyjxf + */ +public class BloodMagicRecipeProcessor implements IRecipeProcessor { + @Override + public Set getAllOverlayIdentifier() { + return new HashSet<>(Arrays.asList( + "altarrecipes", + "alchemicalwizardry.alchemy", + "alchemicalwizardry.bindingritual" + + )); + } + + @Override + public String getRecipeProcessorId() { + return "BloodMagic"; + } + + @Override + public List getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + return new ArrayList<>(recipe.getIngredientStacks(recipeIndex)); + } + } + return null; + } + + @Override + public List getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + List recipeOutputs = new ArrayList<>(); + recipeOutputs.add(recipe.getResultStack(recipeIndex)); + return recipeOutputs; + } + } + return null; + } +} diff --git a/src/main/java/com/github/vfyjxf/nee/processor/ImmersiveEngineeringRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/ImmersiveEngineeringRecipeProcessor.java new file mode 100644 index 0000000..77f5d9a --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/processor/ImmersiveEngineeringRecipeProcessor.java @@ -0,0 +1,57 @@ +package com.github.vfyjxf.nee.processor; + +import blusunrize.immersiveengineering.client.nei.NEICrusherHandler.CachedCrusherRecipe; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.IRecipeHandler; +import codechicken.nei.recipe.TemplateRecipeHandler; + +import java.util.*; + +/** + * @author vfyjxf + */ +public class ImmersiveEngineeringRecipeProcessor implements IRecipeProcessor { + @Override + public Set getAllOverlayIdentifier() { + return new HashSet<>(Arrays.asList( + "ieArcFurnace", "ieBlastFurnace", "ieBlueprintCrafting", + "ieBottlingMachine", "ieCokeOven", "ieCrusher", + "ieFermenter", "ieHammerCrushing", "ieMetalPress", + "ieRefinery", "ieShaderBag", "ieSqueezer" + )); + } + + @Override + public String getRecipeProcessorId() { + return "ImmersiveEngineering"; + } + + @Override + public List getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + List recipeInputs = new ArrayList<>(recipe.getIngredientStacks(recipeIndex)); + if (!("ieArcFurnace".equals(identifier) || "ieCrusher".equals(identifier) || "ieBlastFurnace".equals(identifier))) { + recipeInputs.addAll(recipe.getOtherStacks(recipeIndex)); + } + return recipeInputs; + } + } + return null; + } + + @Override + public List getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + List recipeOutputs = new ArrayList<>(); + recipeOutputs.add(recipe.getResultStack(recipeIndex)); + if ("ieArcFurnace".equals(identifier) || "ieCrusher".equals(identifier)) { + recipeOutputs.addAll(recipe.getOtherStacks(recipeIndex)); + } + return recipeOutputs; + } + } + return null; + } +} diff --git a/src/main/java/com/github/vfyjxf/nee/processor/MekanismRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/MekanismRecipeProcessor.java new file mode 100644 index 0000000..cc2e2ac --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/processor/MekanismRecipeProcessor.java @@ -0,0 +1,52 @@ +package com.github.vfyjxf.nee.processor; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.IRecipeHandler; + +import java.util.*; + +/** + * @author vfyjxf + */ +public class MekanismRecipeProcessor implements IRecipeProcessor { + @Override + public Set getAllOverlayIdentifier() { + return new HashSet<>(Arrays.asList( + "chemicalinfuser", "chemicalinjectionchamber", + "chemicaloxidizer", "chemicalwasher", "combiner", "crusher", "electrolyticseparator", + "chamber", "infuser", "compressor", "prc", "precisionsawmill", "purificationchamber", + "rotarycondensentrator", "solarneutron", "thermalevaporation" + )); + } + + @Override + public String getRecipeProcessorId() { + return "Mekanism"; + } + + @Override + public List getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + List recipeInputs = new ArrayList<>(recipe.getIngredientStacks(recipeIndex)); + if (!recipe.getOtherStacks(recipeIndex).isEmpty()) { + recipeInputs.addAll(recipe.getOtherStacks(recipeIndex)); + } + return recipeInputs; + } + } + return null; + } + + @Override + public List getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) { + for (String ident : getAllOverlayIdentifier()) { + if (ident.equals(identifier)) { + List recipeOutputs = new ArrayList<>(); + recipeOutputs.add(recipe.getResultStack(recipeIndex)); + return recipeOutputs; + } + } + return null; + } +} diff --git a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java index c79b60c..3176a31 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java @@ -46,6 +46,18 @@ public class RecipeProcessor { NotEnoughEnergistics.logger.info("Found ThermalExpansion, install ThermalExpansion support"); recipeProcessors.add(new ThermalExpansionRecipeProcessor()); } + if(Loader.isModLoaded("ImmersiveEngineering")){ + NotEnoughEnergistics.logger.info("Found ImmersiveEngineering, install ImmersiveEngineering support"); + recipeProcessors.add(new ImmersiveEngineeringRecipeProcessor()); + } + if(Loader.isModLoaded("Mekanism")){ + NotEnoughEnergistics.logger.info("Found Mekanism, install Mekanism support"); + recipeProcessors.add(new MekanismRecipeProcessor()); + } + if(Loader.isModLoaded("AWWayofTime")){ + NotEnoughEnergistics.logger.info("Found BloodMagic, install BloodMagic support"); + recipeProcessors.add(new BloodMagicRecipeProcessor()); + } if (Loader.isModLoaded("appliedenergistics2")) { NotEnoughEnergistics.logger.info("Applied Energistics 2 will not be supported"); }