Jaffe2718 / Command-Debug-DevKit

This project is written for debugging Minecraft command.
https://modrinth.com/mod/command-debug-service/
MIT License
13 stars 1 forks source link

Parsing error with advancements #1

Closed Ayfri closed 1 year ago

Ayfri commented 1 year ago

Hello, I'm trying the plugin on an environment without any Service running just to have colors in the editor. But I get a parsing error when using an advancement with a / in its name : image

Jaffe2718 commented 1 year ago

Got it, I will fix this bug soon. Thank you for reporting this issue to me.

Jaffe2718 commented 1 year ago

idea-plugin.zip Try this 1.0.4-rc1

Ayfri commented 1 year ago

Hi, nice fix ! But I now have another problem with attributes :') image

Try this following file :

Details
advancement grant @s everything
advancement revoke @s everything
advancement grant @s only minecraft:adventure/kill_a_mob test
advancement revoke @s only minecraft:adventure/kill_a_mob
advancement grant @s only minecraft:adventure/kill_a_mob
advancement revoke @s only minecraft:adventure/kill_a_mob
advancement grant @s everything
advancement revoke @s everything
advancement grant @s only minecraft:adventure/kill_a_mob test
advancement grant @s only minecraft:adventure/kill_a_mob
advancement revoke @s only minecraft:adventure/kill_a_mob
advancement revoke @s only minecraft:adventure/kill_a_mob
attribute @s minecraft:generic.max_health get
attribute @s minecraft:generic.max_health get 2
attribute @s minecraft:generic.max_health modifier add 53a5a44b-00b8-4c46-9acf-2657f94f142e minecraft:generic.max_health 1 add
attribute @s minecraft:generic.max_health modifier add 091f776b-3cd7-4b29-912f-5e201f1d0697 minecraft:generic.max_health 1 multiply
attribute @s minecraft:generic.max_health modifier add 5feaf022-3fa0-4c41-9463-d7cdae4de6f0 minecraft:generic.max_health 1 multiply_base
attribute @s minecraft:generic.max_health modifier value get 25a47796-f449-49a1-a493-61ab6a92d316
attribute @s minecraft:generic.max_health modifier remove 6bf5b137-4009-48f3-b0a7-8701c7e8bb62
attribute @s minecraft:generic.max_health get 1
attribute @s minecraft:generic.max_health get
attribute @s minecraft:generic.max_health base get
attribute @s minecraft:generic.max_health base set 1
attribute @s minecraft:generic.max_health modifier value get 84565977-9bd2-4b48-a6b7-f578e0d2a382
attribute @s minecraft:generic.max_health get
attribute @s minecraft:generic.max_health base get
attribute @s minecraft:generic.max_health base set 1
attribute @s minecraft:generic.max_health modifier value get cc31ddea-6b5a-4845-957a-5caa55571df6
attribute @s minecraft:generic.max_health get
bossbar add minecraft:bar "foo"
bossbar list
bossbar remove foo:bar
bossbar add foo:bar "bar"
bossbar get foo:bar max
bossbar get foo:bar players
bossbar get foo:bar value
bossbar get foo:bar visible
bossbar set foo:bar color blue
bossbar set foo:bar max 1
bossbar set foo:bar name bar
bossbar set foo:bar players @s
bossbar set foo:bar style notched_6
bossbar set foo:bar value 1
bossbar set foo:bar visible true
clone ~2 ~3 ~4 ~13 ~14 ~12 ~63 ~8 ~21
clone from minecraft:the_nether ~7 ~5 ~1 ~17 ~16 ~17 to minecraft:overworld ~95 ~3 ~37
clone ~1 ~7 ~8 ~10 ~16 ~19 ~93 ~7 ~56 masked move
clone ~5 ~6 ~3 ~15 ~12 ~15 ~88 ~98 ~56 filtered #minecraft:base_stone_overworld force
damage @e[limit=1] 1
damage @e[limit=1] 1 minecraft:arrow
damage @e[limit=1] 1 minecraft:fall at 0 0 0
damage @e[limit=1] 1 minecraft:bad_respawn_point by @s
damage @e[limit=1] 1 minecraft:explosion by @s from @s
data get entity @s foo
data get entity @s foo 1
data merge entity @s {score:{name:"@s",objective:"foo"}}
data merge entity @s {foo:"bar"}
data modify entity @s foo append from entity @s bar
data modify entity @s foo append value 1
data modify entity @s foo append value true
data modify entity @s foo append value "bar"
data modify entity @s foo insert 0 from entity @s bar
data modify entity @s foo insert 0 value 1
data modify entity @s foo insert 0 value true
data modify entity @s foo insert 0 value "bar"
data modify entity @s foo merge value 1
data modify entity @s foo merge value {score:{name:"@s",objective:"foo"}}
data modify entity @s foo prepend from entity @s bar
data modify entity @s foo prepend value 1
data modify entity @s foo prepend value true
data modify entity @s foo prepend value "bar"
data modify entity @s foo set from entity @s bar
data modify entity @s foo set value 1
data modify entity @s foo set value true
data modify entity @s foo set value "bar"
data modify entity @s foo set string entity @s bar 1
data modify entity @s foo set string entity @s bar 0 1
data modify entity @s foo set string entity @s bar -2
data modify entity @s foo set value "bar"
data remove entity @s foo
data modify entity @s foo set value "bar"
data get entity @s foo
datapack disable test
datapack enable test
datapack enable first test
datapack enable last test
datapack enable test before foo
datapack enable test after foo
datapack list available
datapack list enabled
datapack list
effect clear @s minecraft:speed
effect give @s minecraft:speed 100 10 true
effect give @s minecraft:speed infinite 10 true
summon minecraft:marker ~ ~ ~ {data:{},Tags:["82fa1d71-c31b-4b6c-98e8-34d448991521"]}
scoreboard objectives remove 82fa1d71-c31b-4b6c-98e8-34d448991521.score
scoreboard objectives add 82fa1d71-c31b-4b6c-98e8-34d448991521.score dummy
scoreboard objectives add a dummy
scoreboard players set @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] a 0
scoreboard objectives add b dummy
scoreboard players set @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] b 1
scoreboard objectives add c dummy
scoreboard players set @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] c 2
execute if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] a matches 0 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] b matches 1 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] c matches 2 run tellraw @a {"text":"Validated ifCondition with multiple scores","color":"green"}
execute as @e[limit=1,sort=random] run function unit_tests:test_execute_direct_return
execute at @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] run say test
execute align xy anchored eyes facing ~ ~ ~ run say test
execute facing entity @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] feet in minecraft:the_end on attacker positioned 1 2 3 run say test
execute positioned as @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] positioned over ocean_floor rotated ~1 2 run say test
execute rotated as @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] summon minecraft:block_display run say test
execute if biome ~ ~ ~ #minecraft:has_structure/ancient_city if block ~ ~ ~ minecraft:air if blocks ^ ^ ^ 1 2 3 4 5 6 masked if data entity @s test if dimension minecraft:the_end if function unit_tests:test if loaded -2 -2 -2 if predicate test unless score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches ..1 store result block ~ ~ ~ test byte 1 run say test
execute if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches ..0 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches ..1 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches 1 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches 1.. if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches 2.. if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test < @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test <= @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test = @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test >= @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test > @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches 1..5 if score @e[limit=1,tag=82fa1d71-c31b-4b6c-98e8-34d448991521] test matches 1 run say test
execute store success bossbar test value run say test
execute if predicate unit_tests:random_chance run say Hello 50% of the time!
forceload add 0 0
forceload add 0 0 0 0
forceload query
forceload query 0 0
forceload remove 0 0
forceload remove 0 0 0 0
forceload remove all
function unit_tests:tests
function unit_tests:tests {foo:1}
function unit_tests:tests with storage minecraft:foo test
function #unit_tests:function_tests
function #unit_tests:function_tests {foo:1}
function #unit_tests:function_tests with storage minecraft:foo test
function unit_tests:other_function
function unit_tests:other_function {foo:1}
function unit_tests:other_function with storage minecraft:foo test
gamerule doDaylightCycle true
gamerule randomTickSpeed
gamerule doDaylightCycle true
gamerule randomTickSpeed 3
gamerule randomTickSpeed
item modify entity @s weapon minecraft:baz
item replace entity @s container.0 with minecraft:dirt
item replace entity @s armor.head with minecraft:bow 3
item replace block ~ ~ ~ enderchest.2 from block 0 0 0 weapon
item modify entity @s weapon minecraft:baz
item replace entity @s weapon with minecraft:dirt
item replace entity @s weapon with minecraft:bow 3
item replace entity @s weapon from block 0 0 0 weapon
locate biome minecraft:plains
locate structure minecraft:mansion
locate structure #minecraft:village
locate poi minecraft:village/plains/houses
loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~ minecraft:fishing_rod
loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~ mainhand
loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~
loot give @s kill @s
loot give @s loot minecraft:gameplay/cat_morning_gift
loot give @s mine ~ ~ ~ minecraft:fishing_rod
loot give @s mine ~ ~ ~ mainhand
loot give @s mine ~ ~ ~
loot give @s loot minecraft:gameplay/cat_morning_gift
loot insert ~ ~ ~ kill @s
loot spawn 0 0 0 loot minecraft:gameplay/cat_morning_gift
loot replace ~ ~ ~ container.0 loot minecraft:gameplay/cat_morning_gift
loot replace ~ ~ ~ container.0 1 loot minecraft:gameplay/cat_morning_gift
loot replace @s armor.head loot minecraft:gameplay/cat_morning_gift
loot replace @s armor.head 1 loot minecraft:gameplay/cat_morning_gift
particle minecraft:ash
particle minecraft:ash ~ ~ ~
particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2
particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2 force
particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2 normal @e
particle block minecraft:stone_slab[half=top]
particle block_marker minecraft:stone
particle falling_dust minecraft:stone
particle dust 0.6666666666666666 0 1 2
particle dust 0.6705882352941176 0.803921568627451 0.9372549019607843 2
particle dust_color_transition 0.3333333333333333 0.3333333333333333 1 2 1 0.3333333333333333 0.3333333333333333
particle item minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5},{id:"minecraft:knockback",lvl:2}]}
particle minecraft:ash
particle sculk_charge 1.5707963267948966
particle shriek 100
particle vibration 1 2 3 10
place feature minecraft:bonus_chest ~ ~ ~
place jigsaw minecraft:ancient_city/sculk baz 5 ~ ~ ~
place structure minecraft:mineshaft ~ ~ ~
place template minecraft:fossil/skull_1 ~ ~ ~ 90 180
random value 1..6
random value 1..6 mySequence
random value 10..20
random value 1..5
random roll 1..20
random roll 0..100 sequence1
random reset minecraft:sequence1
random reset minecraft:sequence1 1234
random reset minecraft:sequence1 false
random reset * false
random reset * 1234 false false
recipe give @s minecraft:stone
recipe give @s *
recipe take @s minecraft:stone
recipe take @s *
recipe give @s minecraft:stone
recipe give @s *
recipe take @s minecraft:stone
recipe take @s *
return 0
return run function unit_tests:test
execute if predicate test run return 0
execute unless block 0 0 0 minecraft:stone run return run function unit_tests:generated_scopes/generated_1471800355
ride @e[limit=1] mount @s
ride @e[limit=1] dismount
schedule function test 1s append
schedule clear test
schedule function unit_tests:generated_scopes/load_1161382705 1d replace
schedule function test 1 append
schedule clear test
schedule function test 1 replace
scoreboard objectives add test dummy "Test"
scoreboard objectives list
scoreboard objectives modify test displayname "Test"
scoreboard objectives modify test rendertype hearts
scoreboard objectives remove test
scoreboard objectives setdisplay list test
scoreboard players add @s test 5
scoreboard players enable @s test
scoreboard players get @s test
scoreboard players list
scoreboard players list @s
scoreboard players operation @s test += @s test
scoreboard players remove @s test 5
scoreboard players reset @s
scoreboard players reset @s test
scoreboard players set @s test 5
scoreboard objectives add test dummy "Test"
scoreboard objectives add test dummy "Test"
scoreboard objectives modify test displayname "Test"
scoreboard objectives modify test rendertype hearts
scoreboard objectives remove test
scoreboard objectives setdisplay list test
scoreboard players add @s test 5
scoreboard players enable @s test
scoreboard players get @s test
scoreboard players operation @s test += @s test
scoreboard players remove @s test 5
scoreboard players reset @s test
scoreboard players set @s test 5
scoreboard players add @s test 5
scoreboard players enable @s test
scoreboard players get @s test
scoreboard players operation @s test += @s test
scoreboard players operation @s test += @s test
scoreboard players remove @s test 5
scoreboard players reset @s test
scoreboard players set @s test 5
scoreboard objectives list
scoreboard players get @s test
scoreboard players get @s test
scoreboard players get @s test
scoreboard players get @s test
scoreboard players get @s test
scoreboard objectives list
team add test
team add test "Test"
team empty test
team join test @s
team leave @s
team list
team list test
team modify test collisionRule never
team modify test color red
team modify test deathMessageVisibility never
team modify test displayName "Test"
team modify test friendlyFire true
team modify test nametagVisibility never
team modify test prefix "Test"
team modify test seeFriendlyInvisibles true
team modify test suffix "Test"
team remove test
tellraw @a "test"
tellraw @a {"text":"test","color":"red"}
title @r clear
title @s reset
title @s title "test"
title @s subtitle "test"
title @s actionbar {"text":"test","color":"aqua"}
title @s times 1 2 3
title @s times 0.2d 1s 1
time add 1
time query day
time set 1
time set day
trigger test add 1
trigger test set 1
trigger test add -1
weather clear
weather rain
weather thunder
weather clear 100
weather rain 100
weather thunder 100
weather clear 1d
weather rain 1d
weather thunder 1d
worldborder add 1
worldborder add 1 5
worldborder center 1 2
worldborder damage amount 1
worldborder damage buffer 1
worldborder damage amount 1
worldborder get
worldborder set 1
worldborder set 1 5
worldborder warning distance 1
worldborder warning time 1
worldborder get
worldborder get

It's a file generated using DatapackDSL and it's only used in unit tests, verifying that every command is generating the correct output, it has no real usage. It doesn't contains all commands but a pretty large portion of them.

Jaffe2718 commented 1 year ago

Well, well, well ~😓 It seem that there are still plenty of syntax usage details need to add. I will fix these bugs soon.👌

Thanks a lot, and if you have any issues while using the mod or plugin, welcome to send me a report.😊

Jaffe2718 commented 1 year ago

You can try 1.0.4-rc2

Most of the issues are solved. But these commands are not supported:

# The command is not supported
random value 1..6
random value 1..6 mySequence
random value 10..20
random value 1..5
random roll 1..20
random roll 0..100 sequence1

Because these commands are the new feature of Minecraft 1.20.2, and Minecraft 1.20.2 is a snapshot version, once the Minecraft 1.20.2 is released, these commands will be supported.

And you can develop your own external tool to connect to the socket server and interact with it, see https://img.shields.io/badge/DEV%20%7c%20README%2Emd-000000.svg?logo=markdown&logoColor=50AAFF.

Ayfri commented 1 year ago

I see, maybe it's a bit unrelated, but what I am waiting for is a real plugin for creating datapacks with JetBrains IDE, containing code completion and syntax highlighting of commands (with maybe other features like function references, scoreboard references, inspections for common errors detected by Minecraft, colors highlighting, folders recognition, etc.). This plugin would have a configuration file or setting in the IDE to define which version of Minecraft you want to use.

Some tools like the ones made by Pixi could be used for automatically generate version-related data/commands syntaxes etc !


I tried the plugin update, it seems to work fine, except for half-opened ranges ! image

Ayfri commented 1 year ago

Heres an updated file containing all commands from 23w35a :

Content ```mcfunction advancement grant @s everything advancement revoke @s everything advancement grant @s only minecraft:adventure/kill_a_mob test advancement revoke @s only minecraft:adventure/kill_a_mob advancement grant @s only minecraft:adventure/kill_a_mob advancement revoke @s only minecraft:adventure/kill_a_mob advancement grant @s everything advancement revoke @s everything advancement grant @s only minecraft:adventure/kill_a_mob test advancement grant @s only minecraft:adventure/kill_a_mob advancement revoke @s only minecraft:adventure/kill_a_mob advancement revoke @s only minecraft:adventure/kill_a_mob attribute @s minecraft:generic.max_health get attribute @s minecraft:generic.max_health get 2 attribute @s minecraft:generic.max_health modifier add b6958373-f595-437b-89bd-fb8944a4c38c minecraft:generic.max_health 1 add attribute @s minecraft:generic.max_health modifier add d2c6429b-72ba-4e63-ae01-051d6cb36785 minecraft:generic.max_health 1 multiply attribute @s minecraft:generic.max_health modifier add a0cc4bfe-c7be-401e-bffd-54830db8d256 minecraft:generic.max_health 1 multiply_base attribute @s minecraft:generic.max_health modifier value get ccbbb540-d7b8-4f8e-ae40-cd4d087ec1aa attribute @s minecraft:generic.max_health modifier remove bc50afdc-3df3-4ada-9552-bc47fc0d6964 attribute @s minecraft:generic.max_health get 1 attribute @s minecraft:generic.max_health get attribute @s minecraft:generic.max_health base get attribute @s minecraft:generic.max_health base set 1 attribute @s minecraft:generic.max_health modifier value get 06b3c412-0854-4883-bb6c-8a6eb985ff65 attribute @s minecraft:generic.max_health get attribute @s minecraft:generic.max_health base get attribute @s minecraft:generic.max_health base set 1 attribute @s minecraft:generic.max_health modifier value get 467e1e3e-737d-4708-a425-38a4255ad3aa attribute @s minecraft:generic.max_health get bossbar add minecraft:bar "foo" bossbar list bossbar remove foo:bar bossbar add foo:bar "bar" bossbar get foo:bar max bossbar get foo:bar players bossbar get foo:bar value bossbar get foo:bar visible bossbar set foo:bar color blue bossbar set foo:bar max 1 bossbar set foo:bar name bar bossbar set foo:bar players @s bossbar set foo:bar style notched_6 bossbar set foo:bar value 1 bossbar set foo:bar visible true clone ~1 ~2 ~4 ~14 ~10 ~13 ~78 ~41 ~7 clone from minecraft:the_nether ~2 ~1 ~8 ~10 ~14 ~17 to minecraft:overworld ~20 ~71 ~50 clone ~4 ~6 ~7 ~17 ~13 ~16 ~27 ~62 ~78 masked move clone ~4 ~ ~5 ~13 ~19 ~17 ~33 ~97 ~13 filtered #minecraft:base_stone_overworld force damage @e[limit=1] 1 damage @e[limit=1] 1 minecraft:arrow damage @e[limit=1] 1 minecraft:fall at 0 0 0 damage @e[limit=1] 1 minecraft:bad_respawn_point by @s damage @e[limit=1] 1 minecraft:explosion by @s from @s data get entity @s foo data get entity @s foo 1 data merge entity @s {score:{name:"@s",objective:"foo"}} data merge entity @s {foo:"bar"} data modify entity @s foo append from entity @s bar data modify entity @s foo append value 1 data modify entity @s foo append value true data modify entity @s foo append value "bar" data modify entity @s foo insert 0 from entity @s bar data modify entity @s foo insert 0 value 1 data modify entity @s foo insert 0 value true data modify entity @s foo insert 0 value "bar" data modify entity @s foo merge value 1 data modify entity @s foo merge value {score:{name:"@s",objective:"foo"}} data modify entity @s foo prepend from entity @s bar data modify entity @s foo prepend value 1 data modify entity @s foo prepend value true data modify entity @s foo prepend value "bar" data modify entity @s foo set from entity @s bar data modify entity @s foo set value 1 data modify entity @s foo set value true data modify entity @s foo set value "bar" data modify entity @s foo set string entity @s bar 1 data modify entity @s foo set string entity @s bar 0 1 data modify entity @s foo set string entity @s bar -2 data modify entity @s foo set value "bar" data remove entity @s foo data modify entity @s foo set value "bar" data get entity @s foo datapack disable test datapack enable test datapack enable first test datapack enable last test datapack enable test before foo datapack enable test after foo datapack list available datapack list enabled datapack list effect clear @s minecraft:speed effect give @s minecraft:speed 100 10 true effect give @s minecraft:speed infinite 10 true summon minecraft:marker ~ ~ ~ {data:{},Tags:["69ae2b89-6de9-42a3-8c37-c34c26a61bb9"]} scoreboard objectives remove 69ae2b89-6de9-42a3-8c37-c34c26a61bb9.score scoreboard objectives add 69ae2b89-6de9-42a3-8c37-c34c26a61bb9.score dummy scoreboard objectives add a dummy scoreboard players set @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] a 0 scoreboard objectives add b dummy scoreboard players set @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] b 1 scoreboard objectives add c dummy scoreboard players set @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] c 2 execute if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] a matches 0 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] b matches 1 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] c matches 2 run tellraw @a {"text":"Validated ifCondition with multiple scores","color":"green"} execute as @e[limit=1,sort=random] run function unit_tests:test_execute_direct_return execute at @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] run say test execute align xy anchored eyes facing ~ ~ ~ run say test execute facing entity @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] feet in minecraft:the_end on attacker positioned 1 2 3 run say test execute positioned as @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] positioned over ocean_floor rotated ~1 2 run say test execute rotated as @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] summon minecraft:block_display run say test execute if biome ~ ~ ~ #minecraft:has_structure/ancient_city if block ~ ~ ~ minecraft:air if blocks ^ ^ ^ 1 2 3 4 5 6 masked if data entity @s test if dimension minecraft:the_end if function unit_tests:test if loaded -2 -2 -2 if predicate test unless score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches ..1 store result block ~ ~ ~ test byte 1 run say test execute if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches ..0 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches ..1 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches 1 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches 1.. if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches 2.. if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test < @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test <= @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test = @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test >= @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test > @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches 1..5 if score @e[limit=1,tag=69ae2b89-6de9-42a3-8c37-c34c26a61bb9] test matches 1 run say test execute store success bossbar test value run say test execute if predicate unit_tests:random_chance run say Hello 50% of the time! fill ~ ~ ~ ~ ~ ~ minecraft:air fill ~ ~ ~ ~ ~ ~ minecraft:air hollow fill ~ ~ ~ ~ ~ ~ minecraft:air replace minecraft:stone forceload add 0 0 forceload add 0 0 0 0 forceload query forceload query 0 0 forceload remove 0 0 forceload remove 0 0 0 0 forceload remove all function unit_tests:tests function unit_tests:tests {foo:1} function unit_tests:tests with storage minecraft:foo test function #unit_tests:function_tests function #unit_tests:function_tests {foo:1} function #unit_tests:function_tests with storage minecraft:foo test function unit_tests:other_function function unit_tests:other_function {foo:1} function unit_tests:other_function with storage minecraft:foo test gamerule doDaylightCycle true gamerule randomTickSpeed gamerule doDaylightCycle true gamerule randomTickSpeed 3 gamerule randomTickSpeed item modify entity @s weapon minecraft:baz item replace entity @s container.0 with minecraft:dirt item replace entity @s armor.head with minecraft:bow 3 item replace block ~ ~ ~ enderchest.2 from block 0 0 0 weapon item modify entity @s weapon minecraft:baz item replace entity @s weapon with minecraft:dirt item replace entity @s weapon with minecraft:bow 3 item replace entity @s weapon from block 0 0 0 weapon locate biome minecraft:plains locate structure minecraft:mansion locate structure #minecraft:village locate poi minecraft:village/plains/houses loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~ minecraft:fishing_rod loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~ mainhand loot give @s fish minecraft:gameplay/cat_morning_gift ~ ~ ~ loot give @s kill @s loot give @s loot minecraft:gameplay/cat_morning_gift loot give @s mine ~ ~ ~ minecraft:fishing_rod loot give @s mine ~ ~ ~ mainhand loot give @s mine ~ ~ ~ loot give @s loot minecraft:gameplay/cat_morning_gift loot insert ~ ~ ~ kill @s loot spawn 0 0 0 loot minecraft:gameplay/cat_morning_gift loot replace ~ ~ ~ container.0 loot minecraft:gameplay/cat_morning_gift loot replace ~ ~ ~ container.0 1 loot minecraft:gameplay/cat_morning_gift loot replace @s armor.head loot minecraft:gameplay/cat_morning_gift loot replace @s armor.head 1 loot minecraft:gameplay/cat_morning_gift particle minecraft:ash particle minecraft:ash ~ ~ ~ particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2 particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2 force particle minecraft:ash ~ ~ ~ ~ ~ ~ 1 2 normal @e particle block minecraft:stone_slab[half=top] particle block_marker minecraft:stone particle falling_dust minecraft:stone particle dust 0.6666666666666666 0 1 2 particle dust 0.6705882352941176 0.803921568627451 0.9372549019607843 2 particle dust_color_transition 0.3333333333333333 0.3333333333333333 1 2 1 0.3333333333333333 0.3333333333333333 particle item minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5},{id:"minecraft:knockback",lvl:2}]} particle minecraft:ash particle sculk_charge 1.5707963267948966 particle shriek 100 particle vibration 1 2 3 10 place feature minecraft:bonus_chest ~ ~ ~ place jigsaw minecraft:ancient_city/sculk baz 5 ~ ~ ~ place structure minecraft:mineshaft ~ ~ ~ place template minecraft:fossil/skull_1 ~ ~ ~ 90 180 playsound minecraft:mob/bat/takeoff master @e playsound minecraft:mob/bat/takeoff master @e ~ ~ ~ 1 2 1 random value 1..6 random value 1..6 mySequence random value 10..20 random value 1..5 random roll 1..20 random roll 0..100 sequence1 random reset minecraft:sequence1 random reset minecraft:sequence1 1234 random reset minecraft:sequence1 false random reset * false random reset * 1234 false false recipe give @s minecraft:stone recipe give @s * recipe take @s minecraft:stone recipe take @s * recipe give @s minecraft:stone recipe give @s * recipe take @s minecraft:stone recipe take @s * return 0 return run function unit_tests:test execute if predicate test run return 0 execute unless block 0 0 0 minecraft:stone run return run function unit_tests:generated_scopes/generated_602830277 ride @e[limit=1] mount @s ride @e[limit=1] dismount schedule function test 1s append schedule clear test schedule function unit_tests:generated_scopes/load_116184677 1d replace schedule function test 1 append schedule clear test schedule function test 1 replace scoreboard objectives add test dummy "Test" scoreboard objectives list scoreboard objectives modify test displayname "Test" scoreboard objectives modify test rendertype hearts scoreboard objectives remove test scoreboard objectives setdisplay list test scoreboard players add @s test 5 scoreboard players enable @s test scoreboard players get @s test scoreboard players list scoreboard players list @s scoreboard players operation @s test += @s test scoreboard players remove @s test 5 scoreboard players reset @s scoreboard players reset @s test scoreboard players set @s test 5 scoreboard objectives add test dummy "Test" scoreboard objectives add test dummy "Test" scoreboard objectives modify test displayname "Test" scoreboard objectives modify test rendertype hearts scoreboard objectives remove test scoreboard objectives setdisplay list test scoreboard players add @s test 5 scoreboard players enable @s test scoreboard players get @s test scoreboard players operation @s test += @s test scoreboard players remove @s test 5 scoreboard players reset @s test scoreboard players set @s test 5 scoreboard players add @s test 5 scoreboard players enable @s test scoreboard players get @s test scoreboard players operation @s test += @s test scoreboard players operation @s test += @s test scoreboard players remove @s test 5 scoreboard players reset @s test scoreboard players set @s test 5 scoreboard objectives list scoreboard players get @s test scoreboard players get @s test scoreboard players get @s test scoreboard players get @s test scoreboard players get @s test scoreboard objectives list setblock ~ ~ ~ minecraft:air setblock ~ ~ ~ minecraft:air destroy spreadplayers ~ ~ 0 0 false @e spreadplayers ~ ~ 0 0 0 true @e summon minecraft:bat ~ ~ ~ summon minecraft:bat 1 2 3 summon minecraft:bat 1 2 3 {test:1} summon minecraft:bat 1 2 3 {test:1} team add test team add test "Test" team empty test team join test @s team leave @s team list team list test team modify test collisionRule never team modify test color red team modify test deathMessageVisibility never team modify test displayName "Test" team modify test friendlyFire true team modify test nametagVisibility never team modify test prefix "Test" team modify test seeFriendlyInvisibles true team modify test suffix "Test" team remove test teleport ~ ~ ~ teleport 1 2 3 teleport @s teleport @s ~ ~ ~ teleport @s @s teleport @s ~ ~ ~ ~ ~ teleport @s ~ ~ ~ 1 2 teleport @s ~ ~ ~ facing ~ ~ ~ teleport @s ~ ~ ~ facing @s eyes tellraw @a "test" tellraw @a {"text":"test","color":"red"} time add 1 time query day time set 1 time set day title @r clear title @s reset title @s title "test" title @s subtitle "test" title @s actionbar {"text":"test","color":"aqua"} title @s times 1 2 3 title @s times 0.2d 1s 1 trigger test add 1 trigger test set 1 trigger test add -1 weather clear weather rain weather thunder weather clear 100 weather rain 100 weather thunder 100 weather clear 1d weather rain 1d weather thunder 1d worldborder add 1 worldborder add 1 5 worldborder center 1 2 worldborder damage amount 1 worldborder damage buffer 1 worldborder damage amount 1 worldborder get worldborder set 1 worldborder set 1 5 worldborder warning distance 1 worldborder warning time 1 worldborder get worldborder get # Very simple commands: clear clear @s clear @s minecraft:stone clear @s minecraft:stone 1 debug start debug stop defaultgamemode creative difficulty difficulty easy enchant @s minecraft:mending enchant @s minecraft:mending 1 gamemode creative gamemode creative @s give @s minecraft:stone give @s minecraft:stone 1 give @s minecraft:stone{test:1} help help test help help help jfr start jfr stop kill kill @s list list uuids me test msg @s test msg @s test msg @s test perf start perf stop say test seed setworldspawn setworldspawn 1 2 3 setworldspawn ~ ~ ~ ~ ~ spawnpoint spawnpoint @s spawnpoint @s 1 2 3 spawnpoint @s ~ ~ ~ ~ ~ spectate spectate @s spectate @s @s stopsound @s stopsound @s master stopsound @s master minecraft:mob/bat/takeoff stopsound @s * stopsound @s * minecraft:mob/bat/takeoff teammsg test teammsg test ```
Jaffe2718 commented 1 year ago

1.0.4-rc3

Ayfri commented 1 year ago

Hi, we are getting closer to a completely working version of the parser, but I'm still getting an error with particle command when putting blockstate for a block particle. image

(It appears weird to have a particle block with a blockstate, but it's possible and working (I just tried before sending this), so it should be fine.)

The only real error in my code is that it's not the half property but the type one, but nevertheless it should work, and it still doesn't work when using type.

Jaffe2718 commented 1 year ago

1.0.4-rc4

Ayfri commented 1 year ago

Finally, we have the complete file parsing correctly with no errors! This issue can finally be closed.