From 1ca41f88d7729d9279df71cd186ff86f22e7d515 Mon Sep 17 00:00:00 2001 From: Roman / Nea Date: Fri, 6 May 2022 16:13:36 +0200 Subject: Item Shop Recipes (#118) * first draft of item shop PR * add teleporter navigation because i can * fix teleporter navigation because apparently i cant * navigation gui basics * :pushpin: and removed some unused shit and added myself to devtest command * track / untrack + ery texture Co-Authored-By: RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> * consoom the event * fix crash in ItemShopRecipe.java + fetch repository * i am so sorry jani * on second thought, this entire thing was a bit untested * more recipe stuff * make navigation actually good * make pins dissapear if you not a waypoint * npc parsing * save file * different file saving * remove message * Warping... (to deez nuts) * move shit around Co-authored-by: jani270 Co-authored-by: RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> Co-authored-by: Lulonaut --- .../commands/dev/DevTestCommand.java | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java index 27944c92..478f4db7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java @@ -1,4 +1,4 @@ - package io.github.moulberry.notenoughupdates.commands.dev; +package io.github.moulberry.notenoughupdates.commands.dev; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.commands.ClientCommandBase; @@ -10,6 +10,7 @@ import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.Specia import io.github.moulberry.notenoughupdates.miscgui.GuiPriceGraph; import io.github.moulberry.notenoughupdates.util.SBInfo; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiScreen; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.util.BlockPos; @@ -24,7 +25,18 @@ import java.util.List; public class DevTestCommand extends ClientCommandBase { private static final List DEV_TESTERS = - Arrays.asList("moulberry", "lucycoconut", "ironm00n", "ariyio", "throwpo", "lrg89", "dediamondpro", "lulonaut", "craftyoldminer"); + Arrays.asList( + "moulberry", + "lucycoconut", + "ironm00n", + "ariyio", + "throwpo", + "lrg89", + "dediamondpro", + "lulonaut", + "craftyoldminer", + "eisengolem" + ); private static final String[] DEV_FAIL_STRINGS = { "No.", @@ -132,6 +144,16 @@ public class DevTestCommand extends ClientCommandBase { "I would never search")); return; } + if (args.length == 2 && args[0].equalsIgnoreCase("openGui")) { + try { + NotEnoughUpdates.INSTANCE.openGui = (GuiScreen) Class.forName(args[1]).newInstance(); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText( + "Opening gui: " + NotEnoughUpdates.INSTANCE.openGui)); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | ClassCastException e) { + e.printStackTrace(); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("Failed to open this gui.")); + } + } if (args.length == 1 && args[0].equalsIgnoreCase("center")) { double x = Math.floor(Minecraft.getMinecraft().thePlayer.posX) + 0.5f; double z = Math.floor(Minecraft.getMinecraft().thePlayer.posZ) + 0.5f; -- cgit