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

Wrong matched block names / missing distinction between block names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w16a
    • Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre2, Minecraft 15w45a, Minecraft 15w51b, Minecraft 16w02a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 16w44a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 18w07a
    • Confirmed

      The bug

      Some blocks use as name the translation of another block. This is pretty confusing for tools with the CanPlaceOn or CanDestroy tag or when using the /testforblock command.

      Affected blocks

      Probably outdated

      Block ID Translation used
      sapling tile.sapling.oak.name ("Oak Sapling")
      flowing_water water ("Water")
      flowing_lava lava ("Lava")
      piston_head pistonBase ("Piston")
      piston_extension null ("tile.null.name")1
      daylight_detector_inverted daylightDetector ("Daylight Sensor")
      brown_mushroom mushroom ("Mushroom")
      red_mushroom mushroom ("Mushroom")
      brown_mushroom_block mushroom ("Mushroom")
      red_mushroom_block mushroom ("Mushroom")
      double_stone_slab stoneSlab ("Stone Slab")
      double_stone_slab2 stoneSlab2 ("Stone Slab")
      double_wooden_slab woodSlab ("Wood Slab")
      lit_furnace furnace ("Furnace")
      lit_redstone_lamp redstoneLight ("Redstone Lamp")
      lit_redstone_ore oreRedstone ("Redstone Ore")
      standing_sign sign ("Sign")
      wall_sign sign ("Sign")
      unlit_redstone_torch notGate ("Redstone Torch")
      stone_button button ("Button")
      snow_layer snow ("Snow")
      powered_repeater diode ("Redstone Repeater")
      melon_stem pumkinStem ("Pumpkin Stem")2
      end_portal null ("tile.null.name")1
      wooden_button button ("Button")
      powered_comparator comparator ("Redstone Comparator")
      leaves2 leaves ("Leaves")3
      log2 log ("Wood")3
      standing_banner item.banner.white.name ("White Banner")4
      wall_banner item.banner.white.name ("White Banner")4
      kelp_top "Kelp"

      1 End portals and Piston Extensions look for tile.null.name, rather then tile.endPortal.name and tile.pistonExtension.name
      2 Currently only a translation for tile.pumpkinStem.name exists, see MC-64455
      3 A name like "... Variant 2" would be possible
      4 Banners seem to use the item translation which would be wrong because the banner could have any color

      Bad choosen names

      Block ID Block name
      double_plant "Plant"
      tallgrass "Grass"
      stone_slab2 "Red Standstone Slab"5

      5 Assuming that other stone slabs could be added in the future the name "Stone Slab Variant 2" would fit better

      How to reproduce

      To reproduce you can either create an item with the CanPlaceOn or CanDestroy tag or you can use the /testforblock command:

      CanPlaceOn / CanDestroy
      /give @p stone 1 0 {CanPlaceOn:["melon_stem"]}
      
      /testforblock
      /testforblock ~ ~ ~ melon_stem
      

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: