-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a03c59
commit 8761af3
Showing
69 changed files
with
845 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#math:3vec/_print | ||
tellraw @a [{"text":"(3vec) @s: ["},{"score":{"name":"@s","objective":"3vec_x"}},{"text":","},{"score":{"name":"@s","objective":"3vec_y"}},{"text":","},{"score":{"name":"@s","objective":"3vec_z"}},{"text":"]"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#math:3vec/_ssprint | ||
tellraw @a "---3vec---" | ||
tellraw @a [{"text":"xyz:["},{"score":{"name":"3vec_x","objective":"int"}},{"text":","},{"score":{"name":"3vec_y","objective":"int"}},{"text":","},{"score":{"name":"3vec_z","objective":"int"}},{"text":"]"}] | ||
tellraw @a [{"text":"rot:["},{"score":{"name":"3vec_rot0","objective":"int"}},{"text":","},{"score":{"name":"3vec_rot1","objective":"int"}},{"text":","},{"score":{"name":"3vec_l","objective":"int"}},{"text":"]"}] | ||
tellraw @a [{"text":"(3vec) ssobj: ["},{"score":{"name":"3vec_x","objective":"int"}},{"text":","},{"score":{"name":"3vec_y","objective":"int"}},{"text":","},{"score":{"name":"3vec_z","objective":"int"}},{"text":"]"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#math:_version | ||
# 输出数学库版本 | ||
tellraw @s {"text":"<数学库> 当前为2.0.2版本."} | ||
scoreboard players set version int 202 | ||
tellraw @s {"text":"<数学库> 当前为2.0.3版本."} | ||
scoreboard players set version int 203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#math:list/_fill | ||
# 输入个数<inp,int> | ||
# 用storage math:io input填充list | ||
|
||
scoreboard players operation sloop int = inp int | ||
execute if score sloop int matches 1.. run function math:list/fill_sloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#math:list/_key | ||
# 转动列表 | ||
# 查找键key的值是输入的位置 | ||
# 如果没查到则<res,int>输出0 | ||
|
||
execute store result score sloop int store result score stempn int if data storage math:io list[] | ||
|
||
scoreboard players set res int 1 | ||
execute if score sloop int matches 1.. run function math:list/key_sloop | ||
scoreboard players operation list_phi int %= stempn int | ||
scoreboard players add res int 1 | ||
scoreboard players operation res int %= 2 int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#math:list/_toset | ||
# 转换函数:列表->集合 | ||
# 需要传入世界实体为执行者 | ||
|
||
data modify entity @s Tags set value [] | ||
|
||
data modify storage math:io set set value [] | ||
data modify storage math:io set_tags set value [] | ||
scoreboard players set set_cnt int 0 | ||
|
||
data modify storage math:io stemp set from storage math:io list | ||
execute store result score sloop int if data storage math:io stemp[] | ||
execute if score sloop int matches 1.. run function math:list/set/sloop | ||
data modify storage math:io set_tags set from entity @s Tags | ||
|
||
data modify entity @s Tags set value ["math_marker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#math:list/fill_sloop | ||
data modify storage math:io list append from storage math:io input | ||
#循环迭代 | ||
scoreboard players remove sloop int 1 | ||
execute if score sloop int matches 1.. run function math:list/fill_sloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#math:list/key_sloop | ||
data modify storage math:io list append from storage math:io list[0] | ||
data remove storage math:io list[0] | ||
scoreboard players add list_phi int 1 | ||
|
||
data modify storage math:io stemp_cmp set from storage math:io list[0].key | ||
execute store success score res int run data modify storage math:io stemp_cmp set from storage math:io input | ||
execute if score res int matches 0 run scoreboard players set sloop int 1 | ||
#循环迭代 | ||
scoreboard players remove sloop int 1 | ||
execute if score sloop int matches 1.. run function math:list/key_sloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#math:list/set/sloop | ||
data modify block 29999984 0 8591 back_text.messages[0] set value '{"nbt":"stemp[-1]","storage":"math:io"}' | ||
data modify entity @s Tags append from block 29999984 0 8591 back_text.messages[0] | ||
execute store result score sstemp int if data entity @s Tags[] | ||
execute if score sstemp int > set_cnt int run function math:list/set/success | ||
#循环迭代 | ||
data remove storage math:io stemp[-1] | ||
scoreboard players remove sloop int 1 | ||
execute if score sloop int matches 1.. run function math:list/set/sloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#math:list/set/success | ||
data modify storage math:io set append from storage math:io stemp[-1] | ||
scoreboard players add set_cnt int 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#math:list/test/fill | ||
|
||
tellraw @a "---list_test_fill---" | ||
scoreboard players set list_phi int 0 | ||
data modify storage math:io list set value [] | ||
|
||
data modify storage math:io input set value {key:"hi"} | ||
scoreboard players set inp int 5 | ||
function math:list/_fill | ||
tellraw @a ["list: ",{"nbt":"list","storage":"math:io"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#math:list/test/key | ||
|
||
tellraw @a "---list_test_key---" | ||
scoreboard players set inp int 12 | ||
|
||
function math:randstring/_pull | ||
|
||
scoreboard players set list_phi int 0 | ||
data modify storage math:io list set value [] | ||
data modify storage math:io stemp set value {key:""} | ||
scoreboard players operation loop int = inp int | ||
execute if score loop int matches 1.. run function math:list/test/key_loop | ||
tellraw @a ["list: ",{"nbt":"list","storage":"math:io"}] | ||
|
||
data modify storage math:io input set from storage math:io list[8].key | ||
function math:list/_key | ||
tellraw @a ["res: ",{"score":{"name":"res","objective":"int"}}] | ||
tellraw @a ["list: ",{"nbt":"list","storage":"math:io"}] | ||
|
||
data modify storage math:io input set value "哈" | ||
function math:list/_key | ||
tellraw @a ["res: ",{"score":{"name":"res","objective":"int"}}] | ||
|
||
function math:randstring/_back |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#math:list/test/key_loop | ||
data modify storage math:io stemp.key set from storage math:io result[0] | ||
data modify storage math:io list append from storage math:io stemp | ||
#循环迭代 | ||
data remove storage math:io result[0] | ||
scoreboard players remove loop int 1 | ||
execute if score loop int matches 1.. run function math:list/test/key_loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#math:list/test/toset | ||
|
||
tellraw @a "---list_test_toset---" | ||
|
||
scoreboard players set list_phi int 0 | ||
data modify storage math:io list set value [] | ||
|
||
scoreboard players set inp int 2 | ||
data modify storage math:io input set value "hello" | ||
function math:list/_fill | ||
|
||
scoreboard players set inp int 1 | ||
data modify storage math:io input set value "world" | ||
function math:list/_fill | ||
|
||
scoreboard players set inp int 3 | ||
data modify storage math:io input set value "cber" | ||
function math:list/_fill | ||
|
||
tellraw @a ["list: ",{"nbt":"list","storage":"math:io"}] | ||
|
||
execute as @e[tag=math_marker,limit=1] run function math:list/_toset | ||
|
||
tellraw @a ["set: ",{"nbt":"set","storage":"math:io"}] | ||
tellraw @a ["set_tags: ",{"nbt":"set_tags","storage":"math:io"}] | ||
tellraw @a ["set_cnt: ",{"score":{"name":"set_cnt","objective":"int"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#math:marker/_chest | ||
forceload add 29999984 8591 29999984 8591 | ||
setblock 29999984 0 8592 chest | ||
item replace block 29999984 0 8592 container.0 with glass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
#math:qrot/_ex-uvw | ||
#扩展函数:根据xyzw扩展局部坐标系属性 | ||
|
||
execute store result score u1 int store result score u2 int store result score stempxw int run scoreboard players operation u0 int = qrot_x int | ||
execute store result score u1 int store result score u2 int store result score sstempxw int run scoreboard players operation u0 int = qrot_x int | ||
scoreboard players operation u0 int *= qrot_x int | ||
execute store result score v2 int store result score stempyw int run scoreboard players operation v1 int = qrot_y int | ||
execute store result score v2 int store result score sstempyw int run scoreboard players operation v1 int = qrot_y int | ||
scoreboard players operation v1 int *= qrot_y int | ||
execute store result score stempzw int run scoreboard players operation w2 int = qrot_z int | ||
execute store result score sstempzw int run scoreboard players operation w2 int = qrot_z int | ||
scoreboard players operation w2 int *= qrot_z int | ||
scoreboard players operation stempx2 int = u0 int | ||
scoreboard players operation stempy2 int = v1 int | ||
scoreboard players operation stempw2 int = qrot_w int | ||
scoreboard players operation stempw2 int *= qrot_w int | ||
scoreboard players operation u0 int += stempw2 int | ||
scoreboard players operation sstempx2 int = u0 int | ||
scoreboard players operation sstempy2 int = v1 int | ||
scoreboard players operation sstempw2 int = qrot_w int | ||
scoreboard players operation sstempw2 int *= qrot_w int | ||
scoreboard players operation u0 int += sstempw2 int | ||
scoreboard players operation u0 int -= v1 int | ||
scoreboard players operation u0 int -= w2 int | ||
scoreboard players operation v1 int += stempw2 int | ||
scoreboard players operation v1 int -= stempx2 int | ||
scoreboard players operation v1 int += sstempw2 int | ||
scoreboard players operation v1 int -= sstempx2 int | ||
scoreboard players operation v1 int -= w2 int | ||
scoreboard players operation w2 int += stempw2 int | ||
scoreboard players operation w2 int -= stempx2 int | ||
scoreboard players operation w2 int -= stempy2 int | ||
scoreboard players operation w2 int += sstempw2 int | ||
scoreboard players operation w2 int -= sstempx2 int | ||
scoreboard players operation w2 int -= sstempy2 int | ||
|
||
scoreboard players operation u0 int /= 10000 int | ||
scoreboard players operation v1 int /= 10000 int | ||
scoreboard players operation w2 int /= 10000 int | ||
|
||
scoreboard players operation u1 int *= qrot_y int | ||
scoreboard players operation v0 int = u1 int | ||
scoreboard players operation stempzw int *= qrot_w int | ||
scoreboard players operation u1 int += stempzw int | ||
scoreboard players operation v0 int -= stempzw int | ||
scoreboard players operation sstempzw int *= qrot_w int | ||
scoreboard players operation u1 int += sstempzw int | ||
scoreboard players operation v0 int -= sstempzw int | ||
|
||
scoreboard players operation u1 int /= 5000 int | ||
scoreboard players operation v0 int /= 5000 int | ||
|
||
scoreboard players operation u2 int *= qrot_z int | ||
scoreboard players operation w0 int = u2 int | ||
scoreboard players operation stempyw int *= qrot_w int | ||
scoreboard players operation u2 int -= stempyw int | ||
scoreboard players operation w0 int += stempyw int | ||
scoreboard players operation sstempyw int *= qrot_w int | ||
scoreboard players operation u2 int -= sstempyw int | ||
scoreboard players operation w0 int += sstempyw int | ||
|
||
scoreboard players operation u2 int /= 5000 int | ||
scoreboard players operation w0 int /= 5000 int | ||
|
||
scoreboard players operation v2 int *= qrot_z int | ||
scoreboard players operation w1 int = v2 int | ||
scoreboard players operation stempxw int *= qrot_w int | ||
scoreboard players operation v2 int += stempxw int | ||
scoreboard players operation w1 int -= stempxw int | ||
scoreboard players operation sstempxw int *= qrot_w int | ||
scoreboard players operation v2 int += sstempxw int | ||
scoreboard players operation w1 int -= sstempxw int | ||
|
||
scoreboard players operation v2 int /= 5000 int | ||
scoreboard players operation w1 int /= 5000 int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#math:qrot/_print | ||
tellraw @a ["(qrot)xyzw: [",{"score":{"name":"qrot_x","objective":"int"}},{"text":","},{"score":{"name":"qrot_y","objective":"int"}},{"text":","},{"score":{"name":"qrot_z","objective":"int"}},{"text":","},{"score":{"name":"qrot_w","objective":"int"}},{"text":"]"}] | ||
#math:qrot/_zprint | ||
tellraw @a ["(qrot)xyzw: [",{"score":{"name":"@s","objective":"qrot_x"}},{"text":","},{"score":{"name":"@s","objective":"qrot_y"}},{"text":","},{"score":{"name":"@s","objective":"qrot_z"}},{"text":","},{"score":{"name":"@s","objective":"qrot_w"}},{"text":"]"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#math:qrot/_print | ||
tellraw @a ["(qrot)xyzw: [",{"score":{"name":"qrot_x","objective":"int"}},{"text":","},{"score":{"name":"qrot_y","objective":"int"}},{"text":","},{"score":{"name":"qrot_z","objective":"int"}},{"text":","},{"score":{"name":"qrot_w","objective":"int"}},{"text":"]"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#math:qrot/_swap | ||
scoreboard players operation qrot_v0 int >< @s qrot_v0 | ||
scoreboard players operation qrot_v1 int >< @s qrot_v1 | ||
scoreboard players operation qrot_v2 int >< @s qrot_v2 | ||
scoreboard players operation qrot_beta int >< @s qrot_beta | ||
scoreboard players operation qrot_cbeta int >< @s qrot_cbeta | ||
scoreboard players operation qrot_sbeta int >< @s qrot_sbeta | ||
scoreboard players operation qrot_i0 int >< @s qrot_i0 | ||
scoreboard players operation qrot_i1 int >< @s qrot_i1 | ||
scoreboard players operation qrot_i2 int >< @s qrot_i2 | ||
scoreboard players operation qrot_i3 int >< @s qrot_i3 | ||
scoreboard players operation qrot_j0 int >< @s qrot_j0 | ||
scoreboard players operation qrot_j1 int >< @s qrot_j1 | ||
scoreboard players operation qrot_j2 int >< @s qrot_j2 | ||
scoreboard players operation qrot_j3 int >< @s qrot_j3 | ||
scoreboard players operation qrot_alpha int >< @s qrot_alpha | ||
scoreboard players operation x int >< @s x | ||
scoreboard players operation y int >< @s y | ||
scoreboard players operation z int >< @s z | ||
scoreboard players operation u0 int >< @s u0 | ||
scoreboard players operation u1 int >< @s u1 | ||
scoreboard players operation u2 int >< @s u2 | ||
scoreboard players operation v0 int >< @s v0 | ||
scoreboard players operation v1 int >< @s v1 | ||
scoreboard players operation v2 int >< @s v2 | ||
scoreboard players operation w0 int >< @s w0 | ||
scoreboard players operation w1 int >< @s w1 | ||
scoreboard players operation w2 int >< @s w2 | ||
scoreboard players operation qrot_x int >< @s qrot_x | ||
scoreboard players operation qrot_y int >< @s qrot_y | ||
scoreboard players operation qrot_z int >< @s qrot_z | ||
scoreboard players operation qrot_w int >< @s qrot_w |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.