From 7d47283d18151e0943e3e76e6715fa576806e1ba Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Fri, 6 Aug 2021 22:05:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=8Aforge=E7=9A=84=E5=BA=93=E6=8D=A2?= =?UTF-8?q?=E6=88=90gtnh=E8=87=AA=E5=B7=B1=E6=90=AD=E7=9A=84=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 比forge要稳定 --- build.gradle | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 8efa59a..6219464 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,22 @@ buildscript { name = "github" url = "https://github.com/juanmuscaria/maven/raw/master" } + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-1.4.0-SNAPSHOT' + //Defaults to Java 8 & UTF-8 encoding + classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT" } } @@ -33,6 +46,29 @@ repositories { name 'chickenbones' url 'http://chickenbones.net/maven' } + maven { + url = "https://jitpack.io" + } + maven { + name = "ic2" + url = "http://maven.ic2.player.to/" + } + maven { + name = "appleCore" + url = "http://www.ryanliptak.com/maven/" + } + ivy { + name = "gtnh_download_source" + artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") + } + maven { + name = "UsrvDE/GTNH" + url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" + } + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } flatDir { dirs 'libs' } @@ -40,10 +76,13 @@ repositories { dependencies { - compile "codechicken:NotEnoughItems:${mc_version}-${nei_version}:universal" compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev" compile "codechicken:CodeChickenCore:1.7.10-1.0.7.+:dev" + compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") { + setChanging(true) + } + // https://mvnrepository.com/artifact/com.alibaba/fastjson implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.76' @@ -85,4 +124,4 @@ jar{ artifacts { archives devJar archives sourcesJar -} \ No newline at end of file +} From 2c7d498bb931548aca82dabf0988572267f0410b Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Fri, 6 Aug 2021 22:52:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=8B=E7=BC=A9=E5=90=8C=E7=B1=BB?= =?UTF-8?q?=E7=89=A9=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vfyjxf/nee/nei/NEECraftingHandler.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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 b7d74ad..7d6f1dc 100644 --- a/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/nei/NEECraftingHandler.java @@ -15,6 +15,7 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import java.util.ArrayList; import java.util.List; /** @@ -50,8 +51,27 @@ public class NEECraftingHandler implements IOverlayHandler { for (IRecipeProcessor processor : RecipeProcessor.recipeProcessors) { List inputs = processor.getRecipeInput(recipe, recipeIndex, identifier); List outputs = processor.getRecipeOutput(recipe, recipeIndex, identifier); + + List tInputs = new ArrayList<>(); + if (inputs != null && outputs != null) { + for (PositionedStack positionedStack : inputs) { + ItemStack currentStack = positionedStack.items[0]; + boolean find = false; + for (PositionedStack storedStack : tInputs) { + ItemStack StoredStack = storedStack.items[0]; + if (StoredStack.isItemEqual(currentStack) && (StoredStack.stackSize + currentStack.stackSize) <= StoredStack.getMaxStackSize()) { + find = true; + storedStack.items[0].stackSize = StoredStack.stackSize + currentStack.stackSize; + } + } + if (!find) { + tInputs.add(positionedStack); + } + } + + for (PositionedStack positionedStack : tInputs) { ItemStack currentStack = positionedStack.items[0]; for (ItemStack stack : positionedStack.items) { if (Platform.isRecipePrioritized(stack)) { From e4c5c8f1dda6abf23479c34124f5217f89c7d249 Mon Sep 17 00:00:00 2001 From: GlodBlock <60341015+GlodBlock@users.noreply.github.com> Date: Fri, 6 Aug 2021 22:55:47 +0800 Subject: [PATCH 3/3] Update build.gradle --- build.gradle | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/build.gradle b/build.gradle index 6219464..76f06fe 100644 --- a/build.gradle +++ b/build.gradle @@ -6,22 +6,9 @@ buildscript { name = "github" url = "https://github.com/juanmuscaria/maven/raw/master" } - maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" - } - maven { - name = "jitpack" - url = "https://jitpack.io" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" - } } dependencies { - //Defaults to Java 8 & UTF-8 encoding - classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT" + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-1.4.0-SNAPSHOT' } } @@ -46,29 +33,6 @@ repositories { name 'chickenbones' url 'http://chickenbones.net/maven' } - maven { - url = "https://jitpack.io" - } - maven { - name = "ic2" - url = "http://maven.ic2.player.to/" - } - maven { - name = "appleCore" - url = "http://www.ryanliptak.com/maven/" - } - ivy { - name = "gtnh_download_source" - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") - } - maven { - name = "UsrvDE/GTNH" - url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" - } - maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" - } flatDir { dirs 'libs' } @@ -76,13 +40,10 @@ repositories { dependencies { + compile "codechicken:NotEnoughItems:${mc_version}-${nei_version}:universal" compile "codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev" compile "codechicken:CodeChickenCore:1.7.10-1.0.7.+:dev" - compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") { - setChanging(true) - } - // https://mvnrepository.com/artifact/com.alibaba/fastjson implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.76'