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

[BUG] Unable to handle nbt called "item". #117

Open
FireBallMC3 opened this issue Sep 14, 2024 · 1 comment
Open

[BUG] Unable to handle nbt called "item". #117

FireBallMC3 opened this issue Sep 14, 2024 · 1 comment
Assignees
Labels
Type: Bug Something isn't working

Comments

@FireBallMC3
Copy link

FireBallMC3 commented Sep 14, 2024

Describe the bug

Running a command that tries to modify an nbt tag called "item" throws an exception when compiling.

To Reproduce

  1. Write a command that modifies an nbt tag called "item" like execute if entity @s data item run say "hello world!"
  2. Hit compile.

Expected behavior

The compiler shouldn't throw an exception. Instead it should be compiled to execute if data entity @s item run say "hello world!

Screenshots

[If applicable, add screenshots to help explain your problem.]

Desktop

Windows

Additional context

I am using the pre released version for datapack version 48 support.

@FireBallMC3 FireBallMC3 added the Type: Bug Something isn't working label Sep 14, 2024
@Nico314159
Copy link
Contributor

Nico314159 commented Sep 14, 2024

To start, execute if entity @s data item run say "hello world!" is not valid command syntax in the first place
Assuming you mean execute if data entity @s item run say "hello world!", WingedSeal said that's not really possible for him to fix. You have three options for how to rework your code.

  1. Use if (data entity @s item) {say "hello world!";}
  2. Use JMC.put('execute if data entity @s item run say "hello world!"');
  3. Keep your command as execute if data entity @s item run say "hello world!" and add #del item in a header file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants