From c4d8f54315d8f53a80d6a9ed5a6e74bfd44390d6 Mon Sep 17 00:00:00 2001 From: themodernhakr Date: Mon, 24 Mar 2025 13:53:43 -0500 Subject: [PATCH] vault backup: 2025-03-24 13:53:43 --- .obsidian/workspace.json | 12 ++++--- .../When Two Macros are Faster than One.md | 35 +++++++++++++++++++ ...ips for Minecraft Server Administration.md | 2 +- 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 Minecraft Datapacking/When Two Macros are Faster than One.md diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 7338ec5..cea03cc 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "Minecraft Server Administration/Tips for Minecraft Server Administration.md", + "file": "Minecraft Datapacking/When Two Macros are Faster than One.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Tips for Minecraft Server Administration" + "title": "When Two Macros are Faster than One" } } ] @@ -78,7 +78,8 @@ } ], "direction": "horizontal", - "width": 300 + "width": 300, + "collapsed": true }, "right": { "id": "97f741e5ebfbe1b3", @@ -181,8 +182,11 @@ }, "active": "246e3fe4155bbefd", "lastOpenFiles": [ - "Minecraft Server Administration/index.md", + "Minecraft Datapacking/Arrays", "Minecraft Server Administration/Tips for Minecraft Server Administration.md", + "Minecraft Datapacking/When Two Macros are Faster than One.md", + "Minecraft Datapacking", + "Minecraft Server Administration/index.md", "index.md", "Minecraft Server Administration", "-r", diff --git a/Minecraft Datapacking/When Two Macros are Faster than One.md b/Minecraft Datapacking/When Two Macros are Faster than One.md new file mode 100644 index 0000000..094fa87 --- /dev/null +++ b/Minecraft Datapacking/When Two Macros are Faster than One.md @@ -0,0 +1,35 @@ +--- +title: When Two Macros are Faster than One +published: "true" +--- +While working on my Database datapack (still WIP), I knew I'd want to find + +# One Macro +```mcfunction +data modify storage ferdinland:ferdinland temp.keyword set value 'entry500' + +function ferdinland:database/benchmark/arraytest3/_searcharray with storage ferdinland:ferdinland temp + +data remove storage ferdinland:ferdinland temp.keyword + +data remove storage ferdinland:ferdinland temp.result +``` + +``` +$data modify storage ferdinland:ferdinland temp.result set from storage`` ferdinland:ferdinland database.test.arrayTest3.array[string:$(keyword)] +``` +# Two Macro + +```mcfunction +data modify storage ferdinland:ferdinland temp.keyword set value 'entry500' + +function ferdinland:database/benchmark/arraytest2/_searchindex with storage ferdinland:ferdinland temp + +function ferdinland:database/benchmark/arraytest2/_searcharray with storage ferdinland:ferdinland temp + +data remove storage ferdinland:ferdinland temp.keyword + +data remove storage ferdinland:ferdinland temp.index + +data remove storage ferdinland:ferdinland temp.result +``` \ No newline at end of file diff --git a/Minecraft Server Administration/Tips for Minecraft Server Administration.md b/Minecraft Server Administration/Tips for Minecraft Server Administration.md index 4538f96..03c973f 100644 --- a/Minecraft Server Administration/Tips for Minecraft Server Administration.md +++ b/Minecraft Server Administration/Tips for Minecraft Server Administration.md @@ -1,6 +1,6 @@ --- title: Tips for Minecraft Server Administration -published: "true" +published: "false" --- This is a kind of catch-all page. I've gathered a number of random tid-bits from my time hosting a server. Some bits merit there own page, and in the cases where one is written, there will be a link. Some don't need anymore than a list or a few sentences. # Hosting