Closed Ayfri closed 1 year ago
Got it, I will fix this bug soon. Thank you for reporting this issue to me.
idea-plugin.zip Try this 1.0.4-rc1
Hi, nice fix ! But I now have another problem with attributes :')
Try this following file :
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.
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.😊
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 .
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 !
Heres an updated file containing all commands from 23w35a :
ide-debug-tool
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.
(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
.
particle block minecraft:stone_slab[type=top]
Finally, we have the complete file parsing correctly with no errors! This issue can finally be closed.
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 :