From e83b8a597f0983f1de6a6ba0666dfdad359c3d5d Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Sat, 6 Jul 2024 23:23:13 +0200 Subject: meta: Add Skyblock check to the NPC Exporter (#1222) --- .../recipes/generators/NPCLocationExporter.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt index 2b8c99ff..ef989c93 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/recipes/generators/NPCLocationExporter.kt @@ -97,7 +97,7 @@ class NPCLocationExporter { json["z"] = position.z json["island"] = island NotEnoughUpdates.INSTANCE.manager.writeJsonDefaultDir(json, "$id.json") - Utils.addChatMessage("Saved to file") + Utils.addChatMessage("§a[NEU] Saved to file") Minecraft.getMinecraft().displayGuiScreen(null) } @@ -125,15 +125,17 @@ class NPCLocationExporter { @SubscribeEvent fun onMouseClick(event: MouseEvent) { - if (event.buttonstate || event.button != 2 || !NotEnoughUpdates.INSTANCE.config.apiData.repositoryEditing) return + if (event.buttonstate || event.button != 2 || !NotEnoughUpdates.INSTANCE.config.apiData.repositoryEditing || + !NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() + ) return val location = SBInfo.getInstance().getLocation() if (location == null) { - Utils.addChatMessage("No location found") + Utils.addChatMessage("§c[NEU] No location found") return } val pointedEntity = Minecraft.getMinecraft().pointedEntity if (pointedEntity == null) { - Utils.addChatMessage("Could not find entity under cursor") + Utils.addChatMessage("§e[NEU] Could not find entity under cursor") return } if (pointedEntity is EntityVillager) { @@ -161,14 +163,14 @@ class NPCLocationExporter { ) return } - Utils.addChatMessage("Entity under cursor is not a player") + Utils.addChatMessage("§e[NEU] Entity under cursor is not a player") return } val uuid = pointedEntity.uniqueID val position = pointedEntity.position val skin = pointedEntity.locationSkin.resourcePath?.replace("skins/", "") if (skin == null) { - Utils.addChatMessage("Could not load skin") + Utils.addChatMessage("§c[NEU] Could not load skin") return } Minecraft.getMinecraft().displayGuiScreen(NPCNamePrompt(uuid, position, location, skin)) -- cgit