From 4f4fda4f9c8ec564b7d8ea72672ce0aad6541192 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 24 Aug 2025 19:08:21 +0700 Subject: [PATCH] feat: force impulse core --- build-number.txt | 2 +- src/main/java/me/chayapak1/chomens_bot/Configuration.java | 1 + src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java | 2 +- src/main/resources/default-config.yml | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build-number.txt b/build-number.txt index f5a094f2..2932e732 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -3638 \ No newline at end of file +3639 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/Configuration.java b/src/main/java/me/chayapak1/chomens_bot/Configuration.java index 91670286..5e14b4cc 100644 --- a/src/main/java/me/chayapak1/chomens_bot/Configuration.java +++ b/src/main/java/me/chayapak1/chomens_bot/Configuration.java @@ -162,6 +162,7 @@ public class Configuration { public boolean useChat = false; public boolean useSNBTComponents = true; public boolean coreCommandSpy = true; + public boolean forceImpulseCore = false; public boolean logConnectionStatusMessages = true; public boolean resolveSRV = true; public int reconnectDelay = 850; diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java index b0d9f3db..d7dfcfaf 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/CorePlugin.java @@ -168,7 +168,7 @@ public class CorePlugin implements Listener { if (!bot.serverFeatures.hasNamespaces) command = StringUtilities.removeNamespace(command); - if (bot.serverFeatures.hasExtras) { + if (bot.serverFeatures.hasExtras && !bot.options.forceImpulseCore) { bot.session.send(new ServerboundSetCommandBlockPacket( block, command, diff --git a/src/main/resources/default-config.yml b/src/main/resources/default-config.yml index 5298d733..b962a95a 100644 --- a/src/main/resources/default-config.yml +++ b/src/main/resources/default-config.yml @@ -141,6 +141,7 @@ bots: # useChat - when the bot tellraws it will chat instead of using the core to run tellraw # useSNBTComponents - if the server is >=1.21.5, it's pretty likely that you can enable this since 1.21.5 supports SNBT components # coreCommandSpy - set to true if server supports enabling player's commandspy through command block, defaults to true + # forceImpulseCore - set to true if the server is a kaboom clone but still has the minecraft command block mechanic # logConnectionStatusMessages - logs connecting and disconnected messages to console (and the log file) and discord if set to true, defaults to true # resolveSRV - whether to resolve SRV records on the server. the notchian minecraft doesn't resolve them # essentialsMessages - the messages in essentials that the bot uses for self care (no example is intentional) @@ -164,6 +165,7 @@ bots: # useChat: false # useSNBTComponents: true # coreCommandSpy: true + # forceImpulseCore: false # logConnectionStatusMessages: true # resolveSRV: true # reconnectDelay: 2000