Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4214

[1.13] BlockData is not created for specific materials.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version git-Spigot-69774b3-272426a (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
    • Yes

      Block data is not created for some materials, and defaults to Material.AIR.

      This occurs with both Material#createBlockData and Server#createBlockData and the equivalent overloaded methods.

      To Reproduce:

      sender.sendMessage("Expected: " + Material.DIRT + " Got: " + Material.DIRT.createBlockData().getMaterial());
      sender.sendMessage("Expected: " + Material.IRON_SHOVEL + " Got: " + Material.IRON_SHOVEL.createBlockData().getMaterial());
      

      Output of the above lines:

      [02:30:44 INFO]: Expected: DIRT Got: DIRT
      [02:30:44 INFO]: Expected: IRON_SHOVEL Got: AIR

      Running the latest version of Spigot at the time of submission, see the version field.

      I am converting a large list of item aliases to 1.13 and ran into this issue during conversion. I'll attach the output of that process. All Materials where the output is equal to API: AIR are affected. The API material is the result of converting the NEW material to BlockData.

      I am also under the assumption that all Materials can be represented by BlockData. If this is not the case, JavaDocs should be added to the BlockData class which indicate this.

        1. output.log
          197 kB
          Daniel Scalzi

            md_5 md_5
            TheKraken7 Daniel Scalzi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: