{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1142","repository_url":"https://api.github.com/repos/SpongePowered/SpongeAPI","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1142/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1142/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1142/events","html_url":"https://github.com/SpongePowered/SpongeAPI/issues/1142","id":140773856,"number":1142,"title":"Support for serializing sections of the world to disk","user":{"login":"Deamon5550","id":1249030,"avatar_url":"https://avatars.githubusercontent.com/u/1249030?v=3","gravatar_id":"","url":"https://api.github.com/users/Deamon5550","html_url":"https://github.com/Deamon5550","followers_url":"https://api.github.com/users/Deamon5550/followers","following_url":"https://api.github.com/users/Deamon5550/following{/other_user}","gists_url":"https://api.github.com/users/Deamon5550/gists{/gist_id}","starred_url":"https://api.github.com/users/Deamon5550/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deamon5550/subscriptions","organizations_url":"https://api.github.com/users/Deamon5550/orgs","repos_url":"https://api.github.com/users/Deamon5550/repos","events_url":"https://api.github.com/users/Deamon5550/events{/privacy}","received_events_url":"https://api.github.com/users/Deamon5550/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/input%20wanted","name":"input wanted","color":"fbca04"},{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels/world","name":"world","color":"36FF0A"}],"state":"open","locked":false,"assignee":{"login":"Deamon5550","id":1249030,"avatar_url":"https://avatars.githubusercontent.com/u/1249030?v=3","gravatar_id":"","url":"https://api.github.com/users/Deamon5550","html_url":"https://github.com/Deamon5550","followers_url":"https://api.github.com/users/Deamon5550/followers","following_url":"https://api.github.com/users/Deamon5550/following{/other_user}","gists_url":"https://api.github.com/users/Deamon5550/gists{/gist_id}","starred_url":"https://api.github.com/users/Deamon5550/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deamon5550/subscriptions","organizations_url":"https://api.github.com/users/Deamon5550/orgs","repos_url":"https://api.github.com/users/Deamon5550/repos","events_url":"https://api.github.com/users/Deamon5550/events{/privacy}","received_events_url":"https://api.github.com/users/Deamon5550/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-03-14T19:24:40Z","updated_at":"2016-03-14T19:45:18Z","closed_at":null,"body":"We would like to add support for serializing sections of the world to disk. This issue is to gather comments on the layout of the data.\r\n\r\nThis is a mockup of the updated variant of the MCEdit scheamtic format, this variant would not be backwards compatible. The key changes here are the inclusion of a version tag to assist with future content updates and the inclusion of an id palette to both increase compression and allow a much larger range of block states. The format of the block state palette is mostly inspired from the 1.9 chunk data protocol.\r\n\r\nThe format is mocked out here in json although the preferred serialization format for this data would be NBT.\r\n\r\n``` json\r\n\"Schematic\": {\r\n    \"Version\": 1,\r\n    \"Width\": 1,\r\n    \"Height\": 1,\r\n    \"Length\": 1,\r\n    \"OriginX\": 0,\r\n    \"OriginY\": 0,\r\n    \"OriginZ\": 0,\r\n    \"PaletteLength\": 1,\r\n    \"Palette\": {\r\n        \"minecraft:air\": 0\r\n    },\r\n    \"BlockData\":[0],\r\n    \"TileEntities\":[\r\n        {\r\n            \"x\": 0,\r\n            \"y\": 0,\r\n            \"z\":0,\r\n            ...\r\n        }\r\n    ],\r\n    \"Entities\":[\r\n        {\r\n            \"x\": 0,\r\n            \"y\": 0,\r\n            \"z\":0,\r\n            ...\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n- `version`: an integer version number, incremented whenever the format is modified to allow better handling of the content and automatic upgrading of data. The first version will be set as 1.\r\n- `Width, Length, and Height`: shorts specifing the dimensions of the schematic area, these should be treated as unsigned.\r\n- `OriginX/Y/Z`: Optional, allow specifying and offset to be respected when placing this area into the world at a specific point.\r\n- `PaletteLength`: Specifies the number of entries in the `Palette` and also the number of bits used per block `ceil(lg(PaletteLength))` (where lg is the log in base 2).\r\n- `Palette`: Specifies a mapping of block state ids to indices in the palette. The indices must be unique and the largest index cannot exceed the `PaletteLength - 1` and should start at 0.\r\n- `BlockData`: a byte array of `Width * Height * Length` entries where each entry is `ceil(lg(PaletteLength))` bits long packed tightly. The entries in the array are indexed by `x + y * Width + z * Width * Height`\r\n- `TileEntities`: A list of compound tags containing all of the data for a tile entity as well as its position relative to the schematic area.\r\n- `Entities`: Identical to `TileEntities` but for entities. Should be optional\r\n\r\n### Possible inclusions (input wanted)\r\n- `Name`: A tag containing the name of the schematic.\r\n\r\n### Usage\r\nUsage of this format within sponge depends on #1137 and would likely consist of a Builder pattern of some sort."},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/196493097","html_url":"https://github.com/SpongePowered/SpongeAPI/issues/1142#issuecomment-196493097","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1142","id":196493097,"user":{"login":"20zinnm","id":6132034,"avatar_url":"https://avatars.githubusercontent.com/u/6132034?v=3","gravatar_id":"","url":"https://api.github.com/users/20zinnm","html_url":"https://github.com/20zinnm","followers_url":"https://api.github.com/users/20zinnm/followers","following_url":"https://api.github.com/users/20zinnm/following{/other_user}","gists_url":"https://api.github.com/users/20zinnm/gists{/gist_id}","starred_url":"https://api.github.com/users/20zinnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20zinnm/subscriptions","organizations_url":"https://api.github.com/users/20zinnm/orgs","repos_url":"https://api.github.com/users/20zinnm/repos","events_url":"https://api.github.com/users/20zinnm/events{/privacy}","received_events_url":"https://api.github.com/users/20zinnm/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T19:45:18Z","updated_at":"2016-03-14T19:45:18Z","body":"It would be completely independent from structure. You can store anything in there, and it will come back out as a Properties object.\n> On Mar 14, 2016, at 2:43 PM, Nick Condé <notifications@github.com> wrote:\n> \n> @20zinnm <https://github.com/20zinnm> Yeah having a generic Metadata compound tag would probably be a good way to handle it. Could use it to specify a lot of things like:\n> \n> Name\n> Author\n> URL\n> Required Mods etc.\n> —\n> Reply to this email directly or view it on GitHub <https://github.com/SpongePowered/SpongeAPI/issues/1142#issuecomment-196492111>.\n> \n\n"}}