diff --git a/README.md b/README.md index 4c3aa42..b18f50c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ [中文](READNE_CN.md) # Not Enough Energistics + +[![Downloads](https://cf.way2muchnoise.eu/full_515565_downloads.svg)]([Not Enough Energistics - Mods - Minecraft - CurseForge](https://www.curseforge.com/minecraft/mc-mods/not-enough-energistics)) ![MCVsrsion](https://cf.way2muchnoise.eu/versions/515565.svg) + +---- + NotEnoughEnergistics is a port of [Just Enough Energistics](https://www.curseforge.com/minecraft/mc-mods/just-enough-energistics-jee) to Minecraft 1.7.10 This mod replaces AE2's default NEI integration for the Pattern Terminal. @@ -37,6 +42,7 @@ This mod removes that functionality and allows the player to use NEI's transfer - [x] BloodMagic - [x] BuildCraft - [x] Avaritiaddons(auto extreme crafting table support) +- [x] GT++ 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 2aef09c..487d81f 100644 --- a/READNE_CN.md +++ b/READNE_CN.md @@ -1,4 +1,9 @@ # Not Enough Energistics + +[![Downloads](https://cf.way2muchnoise.eu/full_515565_downloads.svg)]([Not Enough Energistics - Mods - Minecraft - CurseForge](https://www.curseforge.com/minecraft/mc-mods/not-enough-energistics)) ![MCVsrsion](https://cf.way2muchnoise.eu/versions/515565.svg) + +---- + NotEnoughEnergistics 是[Just Enough Energistics](https://www.curseforge.com/minecraft/mc-mods/just-enough-energistics-jee) 的逆向移植版本 它替换了AE2默认的NEI集成, 默认情况下ae只能识别玩家身上或者网络里的存储物品。 @@ -32,6 +37,7 @@ NotEnoughEnergistics 是[Just Enough Energistics](https://www.curseforge.com/min - [x] BloodMagic - [x] BuildCraft - [x] Avaritiaddons(允许你从nei转移终极工作台配方到梦魇工作台) +- [x] GT++ 如果你想要别的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 f4824aa..a95fb35 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.6 +mod_version=1.2.7 forge_version=10.13.4.1614 mod_group=com.github.vfyjxf.neenergistics mod_id=neenergistics diff --git a/libs/GT-PlusPlus-1.7.09.GTNH.jar b/libs/GT-PlusPlus-1.7.09.GTNH.jar new file mode 100644 index 0000000..9239558 Binary files /dev/null and b/libs/GT-PlusPlus-1.7.09.GTNH.jar differ diff --git a/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java b/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java new file mode 100644 index 0000000..b4dda8b --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/processor/GTPPRecipeProcessor.java @@ -0,0 +1,54 @@ +package com.github.vfyjxf.nee.processor; + +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.IRecipeHandler; +import gregtech.api.util.GTPP_Recipe; + +import java.util.*; + +/** + * @author vfyjxf + */ +public class GTPPRecipeProcessor implements IRecipeProcessor { + @Override + public Set getAllOverlayIdentifier() { + HashSet identifiers = new HashSet<>(Collections.singletonList("GTPP_Decayables")); + + for (GTPP_Recipe.GTPP_Recipe_Map_Internal gtppMap : GTPP_Recipe.GTPP_Recipe_Map_Internal.sMappingsEx) { + if (gtppMap.mNEIAllowed) { + identifiers.add(gtppMap.mNEIName); + } + } + + return identifiers; + } + + @Override + public String getRecipeProcessorId() { + return "GT++"; + } + + @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)); + recipeInputs.removeIf(positionedStack -> GregTech5RecipeProcessor.getFluidFromDisplayStack(positionedStack.items[0]) != null || positionedStack.item.stackSize == 0); + 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<>(recipe.getOtherStacks(recipeIndex)); + recipeOutputs.removeIf(positionedStack -> GregTech5RecipeProcessor.getFluidFromDisplayStack(positionedStack.items[0]) != null); + 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 530216b..3919b03 100644 --- a/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java +++ b/src/main/java/com/github/vfyjxf/nee/processor/RecipeProcessor.java @@ -62,6 +62,11 @@ public class RecipeProcessor { NotEnoughEnergistics.logger.info("Found BuildCraft-Compat, install BuildCraft-Compat support"); recipeProcessors.add(new BuildCraftRecipeProcessor()); } + if(Loader.isModLoaded("miscutils")){ + NotEnoughEnergistics.logger.info("Found GT++, install GT++ support"); + recipeProcessors.add(new GTPPRecipeProcessor()); + } + if (Loader.isModLoaded("appliedenergistics2")) { NotEnoughEnergistics.logger.info("Applied Energistics 2 will not be supported"); }