-
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
57f0e9c
commit 06759df
Showing
24 changed files
with
242 additions
and
0 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,19 @@ | ||
#> ashen_lib:string/split/ | ||
# | ||
# Break down the string into single characters | ||
# | ||
# @input storage | ||
# ashen_lib:api Argument | ||
# String : string | ||
# @output storage ashen_lib:api | ||
# Return : string[] | ||
# @api | ||
|
||
# Validate | ||
execute unless data storage ashen_lib:api Argument.String run tellraw @a [{"nbt": "Ashen.Global.Prefix.ERROR", "storage": "global"}, {"translate": "Ashen.Api.Error.String", "fallback": "Missing Argument: String"}] | ||
|
||
# Exec | ||
execute if data storage ashen_lib:api Argument.String run function ashen_lib:string/split/core/ | ||
|
||
# Reset | ||
data remove storage ashen_lib:api Argument.String |
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 @@ | ||
#> ashen_lib:string/split/core/ | ||
# @within function ashen_lib:string/split/ | ||
|
||
# Move to Temporary Storage | ||
data modify storage ashen_lib:temp all set from storage ashen_lib:api Argument.String | ||
|
||
# Get Length | ||
execute store result score #Length Ashen.Global.Temporary run data get storage ashen_lib:temp all | ||
|
||
# Division into 2 parts | ||
execute if score #Length Ashen.Global.Temporary matches 1024.. run function ashen_lib:string/split/core/start/1024 | ||
execute if score #Length Ashen.Global.Temporary matches 512.. run function ashen_lib:string/split/core/start/512 | ||
execute if score #Length Ashen.Global.Temporary matches 256.. run function ashen_lib:string/split/core/start/256 | ||
execute if score #Length Ashen.Global.Temporary matches 128.. run function ashen_lib:string/split/core/start/128 | ||
execute if score #Length Ashen.Global.Temporary matches 64.. run function ashen_lib:string/split/core/start/64 | ||
execute if score #Length Ashen.Global.Temporary matches 32.. run function ashen_lib:string/split/core/start/32 | ||
execute if score #Length Ashen.Global.Temporary matches 16.. run function ashen_lib:string/split/core/start/16 | ||
execute if score #Length Ashen.Global.Temporary matches 8.. run function ashen_lib:string/split/core/start/8 | ||
execute if score #Length Ashen.Global.Temporary matches 4.. run function ashen_lib:string/split/core/start/4 | ||
execute if score #Length Ashen.Global.Temporary matches 2.. run function ashen_lib:string/split/core/start/2 | ||
execute if score #Length Ashen.Global.Temporary matches 1.. run function ashen_lib:string/split/core/start/1 | ||
|
||
# Reset | ||
scoreboard players reset #Length Ashen.Global.Temporary |
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,8 @@ | ||
#> ashen_lib:string/split/core/1024 | ||
# @within function | ||
# ashen_lib:string/split/core/start/1024 | ||
|
||
data modify storage ashen_lib:temp 512 set string storage ashen_lib:temp all 0 512 | ||
function ashen_lib:string/split/core/512 | ||
data modify storage ashen_lib:temp 512 set string storage ashen_lib:temp all 512 | ||
function ashen_lib:string/split/core/512 |
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 @@ | ||
#> ashen_lib:string/split/core/128 | ||
# @within function | ||
# ashen_lib:string/split/core/start/128 | ||
# ashen_lib:string/split/core/256 | ||
|
||
data modify storage ashen_lib:temp 64 set string storage ashen_lib:temp all 0 64 | ||
function ashen_lib:string/split/core/64 | ||
data modify storage ashen_lib:temp 64 set string storage ashen_lib:temp all 64 | ||
function ashen_lib:string/split/core/64 |
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 @@ | ||
#> ashen_lib:string/split/core/16 | ||
# @within function | ||
# ashen_lib:string/split/core/start/16 | ||
# ashen_lib:string/split/core/32 | ||
|
||
data modify storage ashen_lib:temp 8 set string storage ashen_lib:temp all 0 8 | ||
function ashen_lib:string/split/core/8 | ||
data modify storage ashen_lib:temp 8 set string storage ashen_lib:temp all 8 | ||
function ashen_lib:string/split/core/8 |
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 @@ | ||
#> ashen_lib:string/split/core/2 | ||
# @within function | ||
# ashen_lib:string/split/core/start/2 | ||
# ashen_lib:string/split/core/4 | ||
|
||
data modify storage ashen_lib:api Return append string storage ashen_lib:temp all 0 1 | ||
data modify storage ashen_lib:api Return append string storage ashen_lib:temp all 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,9 @@ | ||
#> ashen_lib:string/split/core/256 | ||
# @within function | ||
# ashen_lib:string/split/core/start/256 | ||
# ashen_lib:string/split/core/512 | ||
|
||
data modify storage ashen_lib:temp 128 set string storage ashen_lib:temp all 0 128 | ||
function ashen_lib:string/split/core/128 | ||
data modify storage ashen_lib:temp 128 set string storage ashen_lib:temp all 128 | ||
function ashen_lib:string/split/core/128 |
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 @@ | ||
#> ashen_lib:string/split/core/32 | ||
# @within function | ||
# ashen_lib:string/split/core/start/32 | ||
# ashen_lib:string/split/core/64 | ||
|
||
data modify storage ashen_lib:temp 16 set string storage ashen_lib:temp all 0 16 | ||
function ashen_lib:string/split/core/16 | ||
data modify storage ashen_lib:temp 16 set string storage ashen_lib:temp all 16 | ||
function ashen_lib:string/split/core/16 |
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 @@ | ||
#> ashen_lib:string/split/core/4 | ||
# @within function | ||
# ashen_lib:string/split/core/start/4 | ||
# ashen_lib:string/split/core/8 | ||
|
||
data modify storage ashen_lib:temp 2 set string storage ashen_lib:temp all 0 2 | ||
function ashen_lib:string/split/core/2 | ||
data modify storage ashen_lib:temp 2 set string storage ashen_lib:temp all 2 | ||
function ashen_lib:string/split/core/2 |
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 @@ | ||
#> ashen_lib:string/split/core/512 | ||
# @within function | ||
# ashen_lib:string/split/core/start/512 | ||
# ashen_lib:string/split/core/1024 | ||
|
||
data modify storage ashen_lib:temp 256 set string storage ashen_lib:temp all 0 256 | ||
function ashen_lib:string/split/core/256 | ||
data modify storage ashen_lib:temp 256 set string storage ashen_lib:temp all 256 | ||
function ashen_lib:string/split/core/256 |
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 @@ | ||
#> ashen_lib:string/split/core/64 | ||
# @within function | ||
# ashen_lib:string/split/core/start/64 | ||
# ashen_lib:string/split/core/128 | ||
|
||
data modify storage ashen_lib:temp 32 set string storage ashen_lib:temp all 0 32 | ||
function ashen_lib:string/split/core/32 | ||
data modify storage ashen_lib:temp 32 set string storage ashen_lib:temp all 32 | ||
function ashen_lib:string/split/core/32 |
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 @@ | ||
#> ashen_lib:string/split/core/8 | ||
# @within function | ||
# ashen_lib:string/split/core/start/8 | ||
# ashen_lib:string/split/core/16 | ||
|
||
data modify storage ashen_lib:temp 4 set string storage ashen_lib:temp all 0 4 | ||
function ashen_lib:string/split/core/4 | ||
data modify storage ashen_lib:temp 4 set string storage ashen_lib:temp all 4 | ||
function ashen_lib:string/split/core/4 |
6 changes: 6 additions & 0 deletions
6
data/ashen_lib/functions/string/split/core/_index.d.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/_index.d | ||
# @private | ||
|
||
#> Score Holder | ||
# @within function ashen_lib:string/split/core/** | ||
#declare score_holder #Length |
6 changes: 6 additions & 0 deletions
6
data/ashen_lib/functions/string/split/core/start/1.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/1 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
|
||
data modify storage ashen_lib:api Return append string storage ashen_lib:temp all 0 1 | ||
scoreboard players remove #Length Ashen.Global.Temporary 1 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/1024.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/1024 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/1024 | ||
|
||
data modify storage ashen_lib:temp 1024 set string storage ashen_lib:temp all 0 1024 | ||
function ashen_lib:string/split/core/1024 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 1024 | ||
scoreboard players remove #Length Ashen.Global.Temporary 1024 | ||
execute if score #Length Ashen.Global.Temporary matches 1024.. run function ashen_lib:string/split/core/start/1024 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/128.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/128 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/128 | ||
|
||
data modify storage ashen_lib:temp 128 set string storage ashen_lib:temp all 0 128 | ||
function ashen_lib:string/split/core/128 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 128 | ||
scoreboard players remove #Length Ashen.Global.Temporary 128 | ||
execute if score #Length Ashen.Global.Temporary matches 128.. run function ashen_lib:string/split/core/start/128 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/16.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/16 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/16 | ||
|
||
data modify storage ashen_lib:temp 16 set string storage ashen_lib:temp all 0 16 | ||
function ashen_lib:string/split/core/16 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 16 | ||
scoreboard players remove #Length Ashen.Global.Temporary 16 | ||
execute if score #Length Ashen.Global.Temporary matches 16.. run function ashen_lib:string/split/core/start/16 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/2.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/2 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/2 | ||
|
||
data modify storage ashen_lib:temp 2 set string storage ashen_lib:temp all 0 2 | ||
function ashen_lib:string/split/core/2 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 2 | ||
scoreboard players remove #Length Ashen.Global.Temporary 2 | ||
execute if score #Length Ashen.Global.Temporary matches 2.. run function ashen_lib:string/split/core/start/2 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/256.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/256 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/256 | ||
|
||
data modify storage ashen_lib:temp 256 set string storage ashen_lib:temp all 0 256 | ||
function ashen_lib:string/split/core/256 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 256 | ||
scoreboard players remove #Length Ashen.Global.Temporary 256 | ||
execute if score #Length Ashen.Global.Temporary matches 256.. run function ashen_lib:string/split/core/start/256 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/32.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/32 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/32 | ||
|
||
data modify storage ashen_lib:temp 32 set string storage ashen_lib:temp all 0 32 | ||
function ashen_lib:string/split/core/32 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 32 | ||
scoreboard players remove #Length Ashen.Global.Temporary 32 | ||
execute if score #Length Ashen.Global.Temporary matches 32.. run function ashen_lib:string/split/core/start/32 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/4.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/4 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/4 | ||
|
||
data modify storage ashen_lib:temp 4 set string storage ashen_lib:temp all 0 4 | ||
function ashen_lib:string/split/core/4 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 4 | ||
scoreboard players remove #Length Ashen.Global.Temporary 4 | ||
execute if score #Length Ashen.Global.Temporary matches 4.. run function ashen_lib:string/split/core/start/4 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/512.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/512 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/512 | ||
|
||
data modify storage ashen_lib:temp 512 set string storage ashen_lib:temp all 0 512 | ||
function ashen_lib:string/split/core/512 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 512 | ||
scoreboard players remove #Length Ashen.Global.Temporary 512 | ||
execute if score #Length Ashen.Global.Temporary matches 512.. run function ashen_lib:string/split/core/start/512 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/64.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/64 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/64 | ||
|
||
data modify storage ashen_lib:temp 64 set string storage ashen_lib:temp all 0 64 | ||
function ashen_lib:string/split/core/64 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 64 | ||
scoreboard players remove #Length Ashen.Global.Temporary 64 | ||
execute if score #Length Ashen.Global.Temporary matches 64.. run function ashen_lib:string/split/core/start/64 |
10 changes: 10 additions & 0 deletions
10
data/ashen_lib/functions/string/split/core/start/8.mcfunction
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 @@ | ||
#> ashen_lib:string/split/core/start/8 | ||
# @within function | ||
# ashen_lib:string/split/core/ | ||
# ashen_lib:string/split/core/start/8 | ||
|
||
data modify storage ashen_lib:temp 8 set string storage ashen_lib:temp all 0 8 | ||
function ashen_lib:string/split/core/8 | ||
data modify storage ashen_lib:temp all set string storage ashen_lib:temp all 8 | ||
scoreboard players remove #Length Ashen.Global.Temporary 8 | ||
execute if score #Length Ashen.Global.Temporary matches 8.. run function ashen_lib:string/split/core/start/8 |