From a861af6d2ddc93e87760c80c8c9135fdce337092 Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:18:08 +0300 Subject: [PATCH 1/4] Modify tellraw command with data storage check Updated tellraw command to include a conditional check for loaded data. --- data/mce/functions/load/main.mcfunction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mce/functions/load/main.mcfunction b/data/mce/functions/load/main.mcfunction index 16e6ad6..b36c896 100644 --- a/data/mce/functions/load/main.mcfunction +++ b/data/mce/functions/load/main.mcfunction @@ -1,4 +1,4 @@ scoreboard objectives add loadMCE trigger scoreboard players enable @a loadMCE -tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}] +execute if data storage mce:temp {loaded:1b} run tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}] From 3db34cedb40c97a62eca1bc127e97c0da8c8f69a Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:19:37 +0300 Subject: [PATCH 2/4] Update installation messages in main.mcfunction --- data/mce/functions/load/main.mcfunction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mce/functions/load/main.mcfunction b/data/mce/functions/load/main.mcfunction index b36c896..62aceac 100644 --- a/data/mce/functions/load/main.mcfunction +++ b/data/mce/functions/load/main.mcfunction @@ -1,4 +1,4 @@ scoreboard objectives add loadMCE trigger scoreboard players enable @a loadMCE -execute if data storage mce:temp {loaded:1b} run tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}] +execute if data storage mce:config {global:{loaded:1b}} run tellraw @a ["",{"text":"[✔ INSTALL]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 1"},"hoverEvent":{"action":"show_text","contents":"Install the datapack"}},{"text":" "},{"text":"[✖ CANCEL]","color":"red","bold":true,"clickEvent":{"action":"run_command","value":"/trigger loadMCE set 2"},"hoverEvent":{"action":"show_text","contents":"Cancel the installation"}}] From 400ebd5c9bc255e4bb916532a0c3788210b2296d Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:25:00 +0300 Subject: [PATCH 3/4] Update load.mcfunction --- data/mce/functions/core/load.mcfunction | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/mce/functions/core/load.mcfunction b/data/mce/functions/core/load.mcfunction index 1cdecc6..5b0fcd8 100644 --- a/data/mce/functions/core/load.mcfunction +++ b/data/mce/functions/core/load.mcfunction @@ -57,5 +57,8 @@ execute unless data storage mce:config api.announce_default_preset run data modi # v2.2.0 -> 2002000 scoreboard players set #mce load.status 2003000 + +data modify storage mce:config global.loaded set value 1b scoreboard objectives remove loadMCE -tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 loaded!","color":"white"}] +tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 loaded!","color":"yellow"}] +tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Click here to reset.","color":"yellow","clickEvent":{"action":"run_command","value":"/function mce:load/reset_all"]}] From d43924a38d6dc58d4ff7a531e39a737c66a39b68 Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:35:20 +0300 Subject: [PATCH 4/4] Add reset_all.mcfunction to reset MCE state This function resets various scoreboard objectives and removes data from multiple storages related to MCE. --- data/mce/functions/load/reset_all.mcfunction | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 data/mce/functions/load/reset_all.mcfunction diff --git a/data/mce/functions/load/reset_all.mcfunction b/data/mce/functions/load/reset_all.mcfunction new file mode 100644 index 0000000..4156796 --- /dev/null +++ b/data/mce/functions/load/reset_all.mcfunction @@ -0,0 +1,27 @@ +# Objectives +scoreboard objectives add mce.queue dummy +scoreboard objectives add mce.tick dummy +scoreboard objectives add mce.compat dummy +scoreboard objectives add mce.cd dummy +scoreboard objectives add mce.log dummy +scoreboard objectives add loadMCE +scoreboard players reset #tick mce.tick +scoreboard players reset #queue.active mce.compat +scoreboard players reset #sched.exists mce.compat +scoreboard players reset #error.count mce.queue + +# Storages +data remove storage mce:error Last +data remove storage mce:error Code +data remove storage mce:queue commands +data remove storage mce:schedule jobs +data remove storage mce:log entries +data remove storage mce:text_batch entries +data remove storage mce:batch commands +data remove storage mce:config mce.debug +data remove storage mce:config mce.queue_interval +data remove storage mce:config mce.track_output +data remove storage mce:config api.announce_default_preset + +# Debug / Tellraw +tellraw @a ["",{"text":"[MCE] ","color":"aqua"},{"text":"Marker Command Engine v2.3.0 reseted!","color":"yellow"}]