Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/place template causes error during validation #167

Closed
2mal3 opened this issue Jul 23, 2022 · 2 comments
Closed

/place template causes error during validation #167

2mal3 opened this issue Jul 23, 2022 · 2 comments

Comments

@2mal3
Copy link

2mal3 commented Jul 23, 2022

Validating a datapack (e.g. pack.zip) with a place template command (e.g. place template minecraft:fossil/spine_1 ~ ~ ~) leads to the following error:

Error: Plugin "mecha.cli.validate" raised an exception.

Traceback (most recent call last):
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/cli.py", line 30, in validate
    mc.compile(DataPack(path=path), report=mc.diagnostics)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/api.py", line 432, in compile
    compilation_unit.ast = self.parse(
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/api.py", line 303, in parse
    ast = delegate(parser, stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
    return spec.parsers[parser](stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 573, in parse_root
    commands.append(delegate("command", stream))
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
    return spec.parsers[parser](stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 638, in parse_command
    argument = delegate("command:argument", stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
    return spec.parsers[parser](stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 692, in parse_argument
    return delegate(f"command:argument:{tree.parser}", stream)
  File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 530, in delegate
    raise UnrecognizedParser(parser)
mecha.parse.UnrecognizedParser: command:argument:minecraft:template_rotation

I have noticed that this does not happen if you leave out the ~ at the end (only place template minecraft:fossil/spine_1).

@vberlier
Copy link
Member

Ooh good catch! Looks like we're missing an argument parser. I should be able to fix this later.

@vberlier
Copy link
Member

@2mal3 Just fixed it in 718c907. This is released in v0.54.8. If you're using the check-commands action you can bump mecha with the version input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants