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

Various resources do not default namespace to "minecraft" when unspecified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.80.21 Preview, 1.17.40.23 Beta, 1.17.40.21 Beta, 1.17.0.56 Beta, 1.17.0.50 Beta, 1.16.220, 1.16.210.55 Beta, 1.16.210.51 Beta, 1.16.200.57 Beta, 1.16.0.51 Beta, 1.14.30 Hotfix, 1.16.0, 1.16.1, 1.16.100, 1.16.200, 1.16.201 Hotfix, 1.16.221 Hotfix, 1.17.30, 1.17.32, 1.19.22 Hotfix, 1.19.70, 1.20.80, 1.21.31 Hotfix
    • None
    • Confirmed
    • Windows
    • 573902

      The bug

      When excluding the namespace of a resource name, the default namespace "minecraft" is supposed to be assumed. This does not work properly for some items. Table here:

      Commands

      Context Works? Examples
      Entity ID
      /summon cow
      /summon minecraft:cow
      /kill @e[type=cow]
      /kill @e[type=minecraft:cow]
      
      Item ID
      /give @a apple
      /give @a minecraft:apple
      /clear @a apple
      /clear @a minecraft:apple
      /replaceitem entity @a slot.weapon.mainhand 0 apple
      /replaceitem entity @a slot.weapon.mainhand 0 minecraft:apple
      /kill @a[hasitem={item=apple}]
      /kill @a[hasitem={item=minecraft:apple}]
      

      See also MCPE-164366

      Block ID
      /setblock ~ ~ ~ stone
      /setblock ~ ~ ~ minecraft:stone
      /fill ~ ~ ~ ~ ~ ~ stone
      /fill ~ ~ ~ ~ ~ ~ minecraft:stone
      /execute if block ~ ~ ~ stone run say found
      /execute if block ~ ~ ~ minecraft:stone run say found
      /clone ~ ~ ~ ~ ~ ~ ~ ~ ~ filtered normal stone
      /clone ~ ~ ~ ~ ~ ~ ~ ~ ~ filtered normal minecraft:stone
      

      See also MCPE-164366

      Structure ID
      /locate structure village
      /locate structure minecraft:village
      
      Item components
      /give @p dirt 1 0 {"can_place_on":{"blocks":["dirt"]},"can_destroy":{"blocks":["dirt"]}}
      /give @p dirt 1 0 {"minecraft:can_place_on":{"blocks":["minecraft:dirt"]},"minecraft:can_destroy":{"blocks":["minecraft:dirt"]}}
      
      Structure ID
      /structure load test ~ ~ ~
      /structure load minecraft:test ~ ~ ~
      

      Uniquely, structure IDs default to the bizarre "mystructure" namespace

      Recipe ID
      /recipe give @a acacia_wood
      /recipe give @a minecraft:acacia_wood
      

      See MCPE-176610

      Particle ID
      /particle mobflame_emitter ~ ~ ~
      /particle minecraft:mobflame_emitter ~ ~ ~
      
      Camera ID
      /camera @a set free
      /camera @a set minecraft:free
      
      Fog ID
      /fog @a push fog_plains test
      /fog @a push minecraft:fog_plains test
      
      Entity event
      /summon sheep ~ ~ ~ 0 0 entity_born
      /summon sheep ~ ~ ~ 0 0 minecraft:entity_born
      /event entity @e[type=sheep] entity_born
      /event entity @e[type=sheep] minecraft:entity_born
      

      Of related relevance is that damage types, effect IDs, enchantment IDs, dimension IDs, and biome IDs are hardcoded resources without namespaces in Bedrock, so their relevant commands (/damage, /effect, /enchant, /execute in, and /locate) will actually produce a syntax error if the minecraft namespace is provided.

      Pack files

      Context Works? Example
      Behavior file identifier
      {
         "format_version": "1.21.0",
         "minecraft:entity": {
            "description": {
               "identifier": "zombie",
               "is_spawnable": true,
               "is_summonable": true
            },
            "components": {}
         }
      }
      
      Behavior file components
      {
         "format_version": "1.21.0",
         "minecraft:entity": {
            "description": {
               "identifier": "minecraft:skeleton",
               "is_spawnable": true,
               "is_summonable": true
            },
            "components": {
               "scale": {
                  "value": 2
               }
            }
         }
      }
      
      Loot table items and functions
      {
         "pools": [{
            "rolls": 1,
            "entries": [{
               "type": "item",
               "name": "apple",
               "functions": [{
                  "function": "set_count",
                  "count": 10
               }]
            },
            {
               "type": "item",
               "name": "minecraft:diamond",
               "functions": [{
                  "function": "minecraft:set_count",
                  "count": 10
               }]
            }]
         }]
      }
      

      Entries do not support namespaces, see MCPE-151385
      Conditions also do not support namespaces (not yet reported)

      This table is incomplete, I didn't feel like testing every pack file, but I'm pretty sure most of them do not work.
      Of related relevance is every pack file that does not support namespaces to begin with: MCPE-137614

            tryashtar [Mod] tryashtar
            Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: