Skip to content

Commit

Permalink
fix: enable interpolation for game_profile argument
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Jul 25, 2022
1 parent 577bc36 commit e844f49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bolt/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ def get_bolt_parsers(
"score_holder": CommentDisambiguation(
InterpolationParser("entity", parsers["score_holder"])
),
"game_profile": CommentDisambiguation(
InterpolationParser("entity", parsers["game_profile"])
),
}


Expand Down
10 changes: 10 additions & 0 deletions examples/bolt_basic/src/data/demo/functions/foo.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -652,3 +652,13 @@ with runtime.scope() as commands:

say repr(commands[0])
say commands[0]

from uuid import UUID
execute as UUID(fields=(1, 2, 3, 4, 5, 6)) function test:test

from random import Random

rd = Random()
rd.seed(42)
random_id = UUID(int=rd.getrandbits(128))
whitelist add random_id
2 changes: 2 additions & 0 deletions tests/snapshots/examples__build_bolt_basic__0.pack.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ say dummy
say dummy
say AstCommand(identifier='tellraw:targets:message', arguments=AstChildren((AstSelector(variable='p', arguments=AstChildren(())), AstJsonValue(value='hello'))))
say tellraw @p "hello"
execute as 00000001-0002-0003-0405-000000000006 run function test:test
whitelist add bdd640fb-0667-1ad1-1c80-317fa3b1799d
```

`@function demo:import_a`
Expand Down

0 comments on commit e844f49

Please sign in to comment.