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

Custom Components Duplicate

XMLWordPrintable

    • Confirmed
    • Windows
    • 1196291

      With the introduction of Custom Components in 1.20.80.20 Preview, creators are allowed to define their own custom component. However, this doesn't work. This is due to the fact that the json file duplicates each string.

       

      "minecraft:custom_components": [
                      "changelog:yolo"
      ] 

      Turns into

      "minecraft:custom_components": [
                      "changelog:yolo",
                      "changelog:yolo"
      ] 

      This causes the feature to not work. The attached json and script file can be used to recreate this bug.

      Edit: Uploaded a `.mcpack` to easily reproduce this bug.

      • Download `mojira.mcpack`
      • Import to the Preview 1.20.80.20
      • Turn on the content log in the settings -> creator section
      • Apply this pack to a new world
      • Enable the "Beta APIs" experimental toggle.

      You will get a content log error saying the "changelog:yolo" component is defined more than once. Additionally, stepping on the custom block does not produce the "Hi from Custom Block" message. The rest of the script works as indicated by the script engine saying "Hi" every 2 secs

        1. custom_block.json
          1 kB
          SmokeyStack
        2. main.js
          0.4 kB
          SmokeyStack
        3. mojira.mcpack
          2 kB
          SmokeyStack

            SmokeyStack SmokeyStack
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: