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

Syntax Issues: Can't Perform Multiple ReplaceBlock Operations at Once #504

Open
Royal-Terrapin opened this issue Oct 18, 2024 · 0 comments

Comments

@Royal-Terrapin
Copy link

Syntax Issues: Can't Perform Multiple ReplaceBlock Operations at Once

I am having difficulty with syntax for MCA Selector's Change NBT functionality, specifically ReplaceBlocks.

Changing only one block type at a time works:

void before(ReplaceBlocks = "minecraft:dark_oak_planks='byg:aspen_planks'")

But when I enter the following in Change NBT > Script

void before(ReplaceBlocks = "minecraft:dark_oak_planks='byg:aspen_planks'", "minecraft:stripped_dark_oak_log='byg:stripped_aspen_log'")

I get the error "Method definition not expected here", with the error pointer indicating "void."

When I try using standard Java list format with square brackets

void before(ReplaceBlocks = ["minecraft:dark_oak_planks='byg:aspen_planks'", "minecraft:stripped_dark_oak_log='byg:stripped_aspen_log'"])

the program accepts it, even warning me I'm about to change blocks, but upon loading the test world, I see no blocks changed.

What is the proper syntax here?

Environment:

  • OS: Ubuntu 22.02
  • Java version: OpenJDK 17
  • Version of MCA Selector: 2.4.1

Additional context

  • Minecraft 1.19.2
  • Fabric Modded: Oh the Biomes You'll Go (BYG) + more
    [will provide full list if requested]
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

1 participant