From 3a1ec41f6f26210d11bc2a9c4dddb2300c09e35a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 12 Sep 2020 22:43:53 +0100 Subject: [PATCH 1/5] Updated Forge --- build.gradle | 4 ++-- gradle.properties | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index c043bffb8..929fa1a7f 100644 --- a/build.gradle +++ b/build.gradle @@ -90,8 +90,8 @@ repositories { dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_major}.${forge_minor}" //JEI - compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") - runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") +// compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") +// runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") // deobfCompile "team.chisel.ctm:CTM:MC${minecraft_version}-${ctm_version}:api" // deobfCompile "refinedstorage:refinedstorage:${rs_version}:api" // runtime "team.chisel.ctm:CTM:MC${minecraft_version}-${ctm_version}" diff --git a/gradle.properties b/gradle.properties index a74692d62..d904f62b4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,11 +2,11 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false # Build specific -minecraft_version=1.16.2 -forge_major=33.0 -forge_minor=61 +minecraft_version=1.16.3 +forge_major=34.0 +forge_minor=1 mcp_mappings=20200820-1.16.1 # Mod specific -version=3.6.0 +version=3.7.0 jei_version=1.16.2:7.3.2.25 \ No newline at end of file From 93644fa32481fae419821ee71b9183dbcd41e183 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 12 Sep 2020 22:44:07 +0100 Subject: [PATCH 2/5] Disable JEI Plugin --- .../client/BuildingGadgetsJEI.java | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/src/main/java/com/direwolf20/buildinggadgets/client/BuildingGadgetsJEI.java b/src/main/java/com/direwolf20/buildinggadgets/client/BuildingGadgetsJEI.java index b62d4ea7d..360df2455 100644 --- a/src/main/java/com/direwolf20/buildinggadgets/client/BuildingGadgetsJEI.java +++ b/src/main/java/com/direwolf20/buildinggadgets/client/BuildingGadgetsJEI.java @@ -1,64 +1,64 @@ package com.direwolf20.buildinggadgets.client; -import com.direwolf20.buildinggadgets.client.screen.TemplateManagerGUI; -import com.direwolf20.buildinggadgets.common.items.AbstractGadget; -import com.direwolf20.buildinggadgets.common.items.OurItems; -import com.direwolf20.buildinggadgets.common.util.ref.Reference; -import mezz.jei.api.IModPlugin; -import mezz.jei.api.JeiPlugin; -import mezz.jei.api.gui.handlers.IGuiContainerHandler; -import mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter; -import mezz.jei.api.registration.IGuiHandlerRegistration; -import mezz.jei.api.registration.ISubtypeRegistration; -import net.minecraft.client.renderer.Rectangle2d; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -@JeiPlugin -public class BuildingGadgetsJEI implements IModPlugin { - @Override - public ResourceLocation getPluginUid() { - return new ResourceLocation(Reference.MODID, "jei_plugin"); - } - - @Override - public void registerGuiHandlers(IGuiHandlerRegistration registration) { - registration.addGuiContainerHandler(TemplateManagerGUI.class, new GuiContainerHandler()); - } - - @Override - public void registerItemSubtypes(ISubtypeRegistration registration) { - List gadgets = new ArrayList(){{ - add(OurItems.BUILDING_GADGET_ITEM.get()); - add(OurItems.EXCHANGING_GADGET_ITEM.get()); - add(OurItems.DESTRUCTION_GADGET_ITEM.get()); - add(OurItems.COPY_PASTE_GADGET_ITEM.get()); - }}; - - for(Item gadget : gadgets) { - registration.registerSubtypeInterpreter(gadget, itemStack -> { - if (!(itemStack.getItem() instanceof AbstractGadget)) - return ISubtypeInterpreter.NONE; - - double energy = itemStack.getOrCreateTag().getDouble("energy"); - if (energy == 0) - return "empty"; - else if (energy == ((AbstractGadget) itemStack.getItem()).getEnergyMax()) - return "charged"; - - return ISubtypeInterpreter.NONE; - }); - } - } - - private static class GuiContainerHandler implements IGuiContainerHandler { - @Override - public List getGuiExtraAreas(TemplateManagerGUI containerScreen) { - return new ArrayList<>(Collections.singleton(new Rectangle2d((containerScreen.width / 2) + 80, (containerScreen.height / 2) - 80, 60, 120))); - } - } -} +//import com.direwolf20.buildinggadgets.client.screen.TemplateManagerGUI; +//import com.direwolf20.buildinggadgets.common.items.AbstractGadget; +//import com.direwolf20.buildinggadgets.common.items.OurItems; +//import com.direwolf20.buildinggadgets.common.util.ref.Reference; +//import mezz.jei.api.IModPlugin; +//import mezz.jei.api.JeiPlugin; +//import mezz.jei.api.gui.handlers.IGuiContainerHandler; +//import mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter; +//import mezz.jei.api.registration.IGuiHandlerRegistration; +//import mezz.jei.api.registration.ISubtypeRegistration; +//import net.minecraft.client.renderer.Rectangle2d; +//import net.minecraft.item.Item; +//import net.minecraft.util.ResourceLocation; +// +//import java.util.ArrayList; +//import java.util.Collections; +//import java.util.List; +// +//@JeiPlugin +//public class BuildingGadgetsJEI implements IModPlugin { +// @Override +// public ResourceLocation getPluginUid() { +// return new ResourceLocation(Reference.MODID, "jei_plugin"); +// } +// +// @Override +// public void registerGuiHandlers(IGuiHandlerRegistration registration) { +// registration.addGuiContainerHandler(TemplateManagerGUI.class, new GuiContainerHandler()); +// } +// +// @Override +// public void registerItemSubtypes(ISubtypeRegistration registration) { +// List gadgets = new ArrayList(){{ +// add(OurItems.BUILDING_GADGET_ITEM.get()); +// add(OurItems.EXCHANGING_GADGET_ITEM.get()); +// add(OurItems.DESTRUCTION_GADGET_ITEM.get()); +// add(OurItems.COPY_PASTE_GADGET_ITEM.get()); +// }}; +// +// for(Item gadget : gadgets) { +// registration.registerSubtypeInterpreter(gadget, itemStack -> { +// if (!(itemStack.getItem() instanceof AbstractGadget)) +// return ISubtypeInterpreter.NONE; +// +// double energy = itemStack.getOrCreateTag().getDouble("energy"); +// if (energy == 0) +// return "empty"; +// else if (energy == ((AbstractGadget) itemStack.getItem()).getEnergyMax()) +// return "charged"; +// +// return ISubtypeInterpreter.NONE; +// }); +// } +// } +// +// private static class GuiContainerHandler implements IGuiContainerHandler { +// @Override +// public List getGuiExtraAreas(TemplateManagerGUI containerScreen) { +// return new ArrayList<>(Collections.singleton(new Rectangle2d((containerScreen.width / 2) + 80, (containerScreen.height / 2) - 80, 60, 120))); +// } +// } +//} From 2b3b1b08b36e55bb1f85a7802f8d9575ed3d2166 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 12 Sep 2020 22:44:21 +0100 Subject: [PATCH 3/5] Update template header --- .../buildinggadgets/common/tainted/template/TemplateHeader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/direwolf20/buildinggadgets/common/tainted/template/TemplateHeader.java b/src/main/java/com/direwolf20/buildinggadgets/common/tainted/template/TemplateHeader.java index 97bb7d52f..ba751e46e 100644 --- a/src/main/java/com/direwolf20/buildinggadgets/common/tainted/template/TemplateHeader.java +++ b/src/main/java/com/direwolf20/buildinggadgets/common/tainted/template/TemplateHeader.java @@ -28,7 +28,7 @@ */ public final class TemplateHeader { public static final String VERSION = "2-beta"; - private static final String MC_VERSION = "1.16.2"; + private static final String MC_VERSION = "1.16.3"; private static final ComparableVersion COMP_VERSION = new ComparableVersion(VERSION); From 70f3458ae01d4f58ce8fbbd97bfd803b5be7b9e2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 12 Sep 2020 22:45:32 +0100 Subject: [PATCH 4/5] Updated update.json --- update.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/update.json b/update.json index c9dee1bf6..f7e623075 100644 --- a/update.json +++ b/update.json @@ -36,6 +36,9 @@ "1.16.2": { "3.6.0": "Changelog: https://github.com/Direwolf20-MC/BuildingGadgets/wiki/Changelog-1.16" }, + "1.16.3": { + "3.7.0": "Changelog: https://github.com/Direwolf20-MC/BuildingGadgets/wiki/Changelog-1.16" + }, "promos": { "1.12.2-latest": "2.8.2", "1.12.2-recommended": "2.8.2", @@ -46,6 +49,8 @@ "1.16.1-latest": "3.5.1", "1.16.1-recommended": "3.5.1", "1.16.2-latest": "3.6.0", - "1.16.2-recommended": "3.6.0" + "1.16.2-recommended": "3.6.0", + "1.16.3-latest": "3.7.0", + "1.16.3-recommended": "3.7.0" } } From c1a58395b53d944931e88800d6ecf8de4925016c Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 12 Sep 2020 22:49:16 +0100 Subject: [PATCH 5/5] Removed debug because I'm silly --- .../buildinggadgets/common/tainted/save/UndoHistory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/direwolf20/buildinggadgets/common/tainted/save/UndoHistory.java b/src/main/java/com/direwolf20/buildinggadgets/common/tainted/save/UndoHistory.java index 70199cfba..4f83e258c 100644 --- a/src/main/java/com/direwolf20/buildinggadgets/common/tainted/save/UndoHistory.java +++ b/src/main/java/com/direwolf20/buildinggadgets/common/tainted/save/UndoHistory.java @@ -41,7 +41,6 @@ Optional peek() { void read(CompoundNBT nbt) { this.history.clear(); INBT list = nbt.get(NBTKeys.WORLD_SAVE_UNDO_HISTORY); - System.out.println(list); if (list instanceof ListNBT) { NBTHelper.deserializeCollection((ListNBT) list, history, inbt -> Undo.deserialize((CompoundNBT) inbt)); ensureSize();