diff --git a/Minecraft Datapacking/When Two Macros are Faster than One.md b/Minecraft Datapacking/When Two Macros are Faster than One.md index 7738d1a..c94d534 100644 --- a/Minecraft Datapacking/When Two Macros are Faster than One.md +++ b/Minecraft Datapacking/When Two Macros are Faster than One.md @@ -22,12 +22,12 @@ While working on my Database datapack (still WIP), I knew I'd want to find ## Constraints # One Macro Macros allow us to reach into our array and pick out an entry that matching value in the `string` property. -```ts -... one_macro.array[string:$(keyword)] +```haskell +> one_macro.array[string:$(keyword)] ``` ```haskell -// one_macro/run.mcfunction +-- one_macro/run.mcfunction data modify storage test_namespace:test_namespace temp.keyword set value 'entry500' @@ -37,14 +37,14 @@ data remove storage test_namespace:test_namespace temp.keyword data remove storage test_namespace:test_namespace temp.result ``` -```ts -// one_macro/_searcharray.mcfunction +```haskell +-- one_macro/_searcharray.mcfunction $data modify storage test_namespace:test_namespace temp.result set from storage test_namespace:test_namespace one_macro.array[string:$(keyword)] ``` # Two Macro -```ts -// two_macro/run.mcfunction +```haskell +-- two_macro/run.mcfunction data modify storage test_namespace:test_namespace temp.keyword set value 'entry500'