diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-11-02 19:04:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-02 20:04:30 +0100 |
| commit | 5f0291595204c06be9c6462dce6b166b03c19f68 (patch) | |
| tree | 1ed8ea6d8d55d23c0fd8a8cc12ad29f6096a001f /src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java | |
| parent | 6382bdc0d84f2a39c2adeb13c686f422f1914f45 (diff) | |
| download | notenoughupdates-5f0291595204c06be9c6462dce6b166b03c19f68.tar.gz notenoughupdates-5f0291595204c06be9c6462dce6b166b03c19f68.tar.bz2 notenoughupdates-5f0291595204c06be9c6462dce6b166b03c19f68.zip | |
Gui editor (#316)
* kinda working ig
* gui editor kinda works. map and drill fuel doesnt show yet. weird overlapping issues. overlays that have itemstacks glitch out on the left side
* POV: im making scuffed af code during business class
* a
* made it so you ""can"" move the map
* works for everything but the map (AAAAAAAA)
* remove options
* everything working™️ besides the hollows overlay buggin
* hearth 💀
* swap the thingies
* Update Position.java
* Change arbitrary if statement
* Fixed dontRenderOverlay
* Made code more sane
* Add powder overlay and cleaned up NEUConfig
* less work for new gui overlays in the future
* its not a bug
its a feature suggestion
* Fixed map on f1 (thank soopy)
* Fixed map on entrance and fixed interp for e and f1
* no more warning !!
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java index 3967edb4..d52ed196 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/MapCommand.java @@ -33,14 +33,10 @@ import net.minecraft.item.ItemMap; import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.MapData; import java.awt.*; -import java.io.BufferedReader; import java.io.File; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; import java.util.Map; public class MapCommand extends ClientCommandBase { @@ -52,35 +48,8 @@ public class MapCommand extends ClientCommandBase { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (NotEnoughUpdates.INSTANCE.colourMap == null) { - try ( - BufferedReader reader = new BufferedReader(new InputStreamReader(Minecraft - .getMinecraft() - .getResourceManager() - .getResource( - new ResourceLocation("notenoughupdates:maps/F1Full.json")) - .getInputStream(), StandardCharsets.UTF_8)) - ) { - JsonObject json = NotEnoughUpdates.INSTANCE.manager.gson.fromJson(reader, JsonObject.class); - - NotEnoughUpdates.INSTANCE.colourMap = new Color[128][128]; - for (int x = 0; x < 128; x++) { - for (int y = 0; y < 128; y++) { - NotEnoughUpdates.INSTANCE.colourMap[x][y] = new Color(0, 0, 0, 0); - } - } - for (Map.Entry<String, JsonElement> entry : json.entrySet()) { - int x = Integer.parseInt(entry.getKey().split(":")[0]); - int y = Integer.parseInt(entry.getKey().split(":")[1]); - - NotEnoughUpdates.INSTANCE.colourMap[x][y] = new Color(entry.getValue().getAsInt(), true); - } - } catch (Exception ignored) { - } - } - if (!NotEnoughUpdates.INSTANCE.config.hidden.dev) { - NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(); + NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null); return; } @@ -90,7 +59,7 @@ public class MapCommand extends ClientCommandBase { } if (args.length != 2) { - NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(); + NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null); return; } @@ -157,6 +126,6 @@ public class MapCommand extends ClientCommandBase { return; } - NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(); + NotEnoughUpdates.INSTANCE.openGui = new GuiDungeonMapEditor(null); } } |
