Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-167941

BlockPermutation.resolve doesn't support properties with namespaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19.70.26 Preview
    • None
    • Unconfirmed
    • Multiple

      Issue: In the latest preview, the new BlockPermutation.resolve() method will throw the following error when using namespaced custom block properties: [Scripting][error]-Failed to resolve block "(block)" with properties

      {"(property)":(value)}

      . This is a huge disadvantage to Script API, as it means we cannot change the property values of our custom blocks. We also can't just change custom block property names to not include namespaces, because they're required for the block identifier.

      How to reproduce:
      1. Make a new behavior pack if you don't already have one
      2. Create a custom block with custom properties
      3. Create a script that tries to edit the value of at least one of those properties
      4. If you don't include the script file path in the manifest, make sure you have some way to run the script
      5. Load a world with the behavior pack and/or place the block down

      The files below are an example of me trying to create a custom fire block with as similar functionality to the vanilla block as possible. It's still incomplete in this file obviously, but because of this bug, I can't change which parts of the fire model are visible based on what adjacent block faces are solid (not without running several hundred execute commands per tick, and I don't need to explain why that's not a great option).

        1. cursed_fire.json
          2 kB
        2. main.js
          0.8 kB
        3. image-2023-03-05-11-10-11-368.png
          image-2023-03-05-11-10-11-368.png
          1.69 MB

            Xorkent 2 Bart Simpson
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: