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

Structure saving STRUCTURE_VOID

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • CraftBukkit version 3276-Spigot-3892929-b58f429
    • just my test plugin
    • Yes

      I noticed when saving structures using the new API, structure_void blocks are saving to the palette, this isn't something that vanilla Minecraft does.

      this is the NBT of a structure saved with Spigot:

       

      [14:00:22 INFO]: SPIGOT: {
       size: [2, 2, 2],
       DataVersion: 2730,
       blocks: [
        {
         state: 0,
         pos: [0, 0, 0]
        },
        {
         state: 1,
         pos: [0, 0, 1]
        },
        {
         state: 1,
         pos: [1, 0, 0]
        },
        {
         state: 1,
         pos: [1, 0, 1]
        },
        {
         state: 2,
         pos: [0, 1, 0]
        },
        {
         state: 1,
         pos: [0, 1, 1]
        },
        {
         state: 1,
         pos: [1, 1, 0]
        },
        {
         state: 3,
         pos: [1, 1, 1]
        }
       ],
       palette: [
        {
         Name: "minecraft:stone"
        },
        {
         Name: "minecraft:bedrock"
        },
        {
         Name: "minecraft:iron_ore"
        },
        {
         Name: "minecraft:structure_void"
        }
       ],
       entities: []
      } 

       

       

      this is the NBT of a structure saved with MC (using a vanilla structure block)

       

      14:00:22 INFO]: MC: {
       size: [2, 2, 2],
       DataVersion: 2730,
       blocks: [
        {
         state: 0,
         pos: [0, 0, 0]
        },
        {
         state: 1,
         pos: [0, 0, 1]
        },
        {
         state: 1,
         pos: [1, 0, 0]
        },
        {
         state: 1,
         pos: [1, 0, 1]
        },
        {
         state: 1,
         pos: [0, 1, 0]
        },
        {
         state: 1,
         pos: [0, 1, 1]
        },
        {
         state: 1,
         pos: [1, 1, 0]
        }
       ],
       palette: [
        {
         Name: "minecraft:stone"
        },
        {
         Name: "minecraft:bedrock"
        }
       ],
       

      in both, I placed down a structure_void, as you can see, Minecraft does not save this to file.

       

      The reason behind that is, Minecraft saves air (same as spigot), and places air, but structure voids are void from the world, and do not replace blocks where they are placed.

      Spigot not following suit with this kinda breaks the logic. Maybe an option is to add a method or something to remove all structure voids and/or dont save them to file.

      I will include a test plugin, which creates a spigot structure, saves it to file, then prints out the palette. Unfortunately the NBT I got externally.

       

      Steps to reproduce:

      • install my plugin on the server
      • run command `/test` in console
      • this will create a structure named "test-spigot" in `world/generated/minecraft/structures/`
      • it will also print out the palette in console, showing that the structure void was saved, when it shouldn't be saved to the palette

       

            Unassigned Unassigned
            ShaneBee Shane Bee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: