• 47 views
  • save_alt 0 downloads
Compatibility
Minecraft 26.2
Changes include
  • Functions
  • 1
  • 0
Legends11
Lvl 6Apprentice Miner
9

RTWrapper

RTWrapper is a datapack for Java Edition 26.2.

Layout



datapack/RTWrapper-Datapack/ Standalone datapack root
datapack/commands-26.2.json Command wrapper manifest + command parameter names
docs/API.md API/storage protocol



Datapack API quick start


Generated command wrappers use meaningful command-specific parameter names. There is no generated catch-all or generic numeric parameter API.

Provide the named parameters in the order listed for that command in datapack/commands-26.2.json. The dispatcher calls the exact <command>_<N> variant and does not append unused params.
# /tp @s 0 80 0 via queued handler
data modify storage rtwrapper:api request set value {cmd:"tp",params:{target:"@s",x:"0",y:"80",z:"0"}}
function rtwrapper:api/run

# /give @s minecraft:stone 1 via direct API
data modify storage rtwrapper:api params set value {target:"@s",item:"minecraft:stone",count:"1"}
function rtwrapper:api/commands/give

# /scoreboard players set #smoke rtw.test 1
data modify storage rtwrapper:api request set value {cmd:"scoreboard",params:{category:"players",action:"set",subject:"#smoke",objective:"rtw.test",value:"1"}}
function rtwrapper:api/run

Named convenience wrapper example:
# $give $(target) $(item)$(components) $(count)
data modify storage rtwrapper:api params set value {target:"@s",item:"minecraft:stone",components:"",count:"1"}
function rtwrapper:api/commands/give_item

Autotick usage:
function rtwrapper:api/autotick/on

data modify storage rtwrapper:api request set value {cmd:"say",params:{message:"queued hello"}}
function rtwrapper:api/enqueue

Autotick processes one queued action per tick. Use function rtwrapper:api/run only for immediate full queue drain.

See docs/API.md for the full protocol and debug/silent controls.

Safety

RTWrapper intentionally exposes privileged macro-command execution for trusted datapacks/admins. Do not copy untrusted player-controlled text into rtwrapper:api request or rtwrapper:api params.

  Have something to say?

Welcome