コマンドには整数のビット演算が存在しないため、ビット演算を行いたい場合には1ビットずつ処理を行う必要があります。 素数積による疑似ビットベクトル表現を用いることで、ビットの密度を犠牲にして一部のビット演算を高速に行うことができます。
以下のように、素数の積を用いて長さ8のビットベクトルを表現することができます。
下位
| #> example | |
| function init | |
| tellraw @s {storage: "_", nbt: "{}"} | |
| # ┌ #read | |
| # ring_overflow: [ _ | ] | |
| # #write ┘ │ └ #ring_overflow_size | |
| # └ #ring_size |
| /* https://www.minecraft.net/en-us/article/minecraft-snapshot-25w09a */ | |
| simple_hex_literal = | |
| '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | |
| unicode_name = | |
| ( | |
| | '-' | |
| | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | |
| | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' |
| # examples | |
| data merge storage example: { \ | |
| 1: 0b, \ | |
| 2: 0s, \ | |
| 3: 0, \ | |
| 4: 0L, \ | |
| 5: 0.0f, \ | |
| 6: 0.0d, \ | |
| 7: [B;], \ |
| tick | |
| commandFunctions | |
| minecraft:tick -> (Server) | |
| minecraft:load -> (Server) | |
| levels | |
| $level | |
| timeSync | |
| tick | |
| world border | |
| weather |
| function init | |
| # 1782934792843521910 = 0x18be41bf_691f6f76 | |
| # = (0x18be41bf, 0x691f6f76) | |
| # = (415121855, 1763667830) | |
| data modify storage _ source set value 1782934792843521910L | |
| # 1782934792843521910 -> (415121855, 1763667830) | |
| function split |
| function high32:init | |
| data modify storage _ a set value -1145395493543608220L | |
| # (0xf01abcde00000064) | |
| function high32:get {source: "storage _ a"} | |
| # Function high32:get returned -266683170 | |
| # (0xf01abcde) |
| summon text_display ~ ~ ~ {text: '{"text": "a", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 10]} | |
| summon text_display ~ ~ ~ {text: '{"text": "b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 11]} | |
| summon text_display ~ ~ ~ {text: '{"text": "c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 12]} | |
| summon text_display ~ ~ ~ {text: '{"text": "(b⋅a)b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 0]} | |
| summon text_display ~ ~ ~ {text: '{"text": "bab", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 1]} | |
| summon text_display ~ ~ ~ {text: '{"text": "(c⋅bab)c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 2]} | |
| summon text_display ~ ~ ~ {text: '{"text": "c(bab)c", "color": "red"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 3]} |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |