Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-231251

The "data" in "append_static" of "block_entity_modifier" in "rule" processor and biome item particle effect's "tag" don't work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17, 1.17.1 Release Candidate 2, 1.17.1, 1.18.1, 1.20.1
    • None
    • Confirmed
    • (Unassigned)

      Description:

      In processor lists, entries with processor type "rule" have a property named "block_entity_modifier", which has a type "append_static" with a tag "data".
      In a biome json file, the particle effect if set to "item" has a "tag" property under options, value.

      Both of these properties request NBT to be specified, but the conventional way of specifying nbt in json files doesn't work. Unlike every other file, which requires SNBT:

      "{some_nbt_tag:1b}"

      The NBT is instead required to be specified in a JsonObject like the example below this line. This prevents providing data type suffixes and makes lists, which would be invalid NBT, valid syntax for JSON.

      {"some_nbt_tag":1,"not_valid_nbt_list":["hey",{"this_is":"seemingly allowed"}]}

      More importantly, some NBT cannot be provided in this format. For example, an NBT with an integer array to merge into a chest:

      {Items:[{Slot:0b,id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Colors:[I;16711680,65280,255]}]}}}]}

      When using:

      {"Items":[{"Slot":0,"id":"firework_rocket","Count":1,"tag":{"Fireworks":{"Explosions":[{"Colors":[16711680,65280,255]}]}}}]} 

      The game will convert this JsonObject to an NBT like:

      {Items:[{Slot:0b,id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Colors:[{"":16711680},{"":65280},{"":255s}]}]}}}]} 

      which is not correct. This example can be reproduced with the attached data pack, using command /place structure test:test_structure

      Theoretically, conversion JsonObject into NBT is unfeasible at all. Here is also some information about conversion between Json to NBT.

      These two instances should be changed to require the string input, rather than this weird method, then it's also consistent with advancements, loot tables, predicates, etc.

      Original Description:

      In a "processor_type": "minecraft:rule" item of a processor_list, the property output_nbt is supposed to set nbt to the output block defined in the output_state property. However, it just returns the block without considering nbt.

      How to reproduce :

      • Use the attached processor in any existing / custom template_pool.
      • Eventually replace "minecraft:stone" by a block that the targeted structure contains.

      Stone blocks (or the input block) will be replaced by dispensers, but they won't have any Lock data.

            Unassigned Unassigned
            PauseKawa KawaMood
            Votes:
            8 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: