From f7a47ef0e532279aa31f9fd9f3bf0ef600d7399d Mon Sep 17 00:00:00 2001 From: Mango Jelly Pudding <74277414+EvanHsieh0415@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:27:40 +0000 Subject: [PATCH 1/4] fix: markdown event url --- .../java/dev/latvian/mods/kubejs/command/DumpCommands.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java index 6bd3392b8..7dad0c6a2 100644 --- a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java +++ b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java @@ -79,9 +79,7 @@ public static int events(CommandSourceStack source) { if (eventType.getPackageName().startsWith("dev.latvian.mods.kubejs")) { builder.append('[').append(UtilsJS.toMappedTypeString(eventType)).append(']') - .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/") - .append(KubeJS.MC_VERSION_NUMBER) - .append("/common/src/main/java/") + .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/main/src/main/java/") .append(eventType.getPackageName().replace('.', '/')) .append('/').append(eventType.getSimpleName()).append(".java") .append(')'); From 324f677d7006c6ee24919517af26bf1b9735aa10 Mon Sep 17 00:00:00 2001 From: Mango Jelly Pudding <74277414+EvanHsieh0415@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:30:37 +0000 Subject: [PATCH 2/4] fix: remove unuse pacakge --- src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java index 7dad0c6a2..103e9666e 100644 --- a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java +++ b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java @@ -2,7 +2,6 @@ import com.google.common.base.Strings; import com.mojang.brigadier.exceptions.CommandSyntaxException; -import dev.latvian.mods.kubejs.KubeJS; import dev.latvian.mods.kubejs.KubeJSPaths; import dev.latvian.mods.kubejs.event.EventGroups; import dev.latvian.mods.kubejs.script.ConsoleJS; From 849c329850b24c3ae5e017ae7cd84219fbd6bda9 Mon Sep 17 00:00:00 2001 From: Mango Jelly Pudding <74277414+EvanHsieh0415@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:50:01 +0000 Subject: [PATCH 3/4] feat: better way? --- .../java/dev/latvian/mods/kubejs/command/DumpCommands.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java index 103e9666e..a7c64184a 100644 --- a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java +++ b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java @@ -24,6 +24,7 @@ public class DumpCommands { private static final char UNICODE_TICK = '✔'; private static final char UNICODE_CROSS = '✘'; + private static final char BRANCH_NAME = "main"; public static int events(CommandSourceStack source) { var groups = EventGroups.ALL.get().map(); @@ -78,7 +79,8 @@ public static int events(CommandSourceStack source) { if (eventType.getPackageName().startsWith("dev.latvian.mods.kubejs")) { builder.append('[').append(UtilsJS.toMappedTypeString(eventType)).append(']') - .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/main/src/main/java/") + .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/main/src/") + .append(BRANCH_NAME).append("/java/") .append(eventType.getPackageName().replace('.', '/')) .append('/').append(eventType.getSimpleName()).append(".java") .append(')'); From b09d8947582b25d83f3749268d7b80816efbbdc0 Mon Sep 17 00:00:00 2001 From: Mango Jelly Pudding <74277414+EvanHsieh0415@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:55:16 +0000 Subject: [PATCH 4/4] redo: 324f677d7006c6ee24919517af26bf1b9735aa10 --- .../java/dev/latvian/mods/kubejs/command/DumpCommands.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java index a7c64184a..103e9666e 100644 --- a/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java +++ b/src/main/java/dev/latvian/mods/kubejs/command/DumpCommands.java @@ -24,7 +24,6 @@ public class DumpCommands { private static final char UNICODE_TICK = '✔'; private static final char UNICODE_CROSS = '✘'; - private static final char BRANCH_NAME = "main"; public static int events(CommandSourceStack source) { var groups = EventGroups.ALL.get().map(); @@ -79,8 +78,7 @@ public static int events(CommandSourceStack source) { if (eventType.getPackageName().startsWith("dev.latvian.mods.kubejs")) { builder.append('[').append(UtilsJS.toMappedTypeString(eventType)).append(']') - .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/main/src/") - .append(BRANCH_NAME).append("/java/") + .append('(').append("https://github.com/KubeJS-Mods/KubeJS/tree/main/src/main/java/") .append(eventType.getPackageName().replace('.', '/')) .append('/').append(eventType.getSimpleName()).append(".java") .append(')');