{"action":"created","issue":{"url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/12","repository_url":"https://api.github.com/repos/LambdaSix/InfiniMap","labels_url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/12/comments","events_url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/12/events","html_url":"https://github.com/LambdaSix/InfiniMap/issues/12","id":218642157,"number":12,"title":"Block array mapping in Chunks is not correct","user":{"login":"james0x0A","id":534494,"avatar_url":"https://avatars0.githubusercontent.com/u/534494?v=3","gravatar_id":"","url":"https://api.github.com/users/james0x0A","html_url":"https://github.com/james0x0A","followers_url":"https://api.github.com/users/james0x0A/followers","following_url":"https://api.github.com/users/james0x0A/following{/other_user}","gists_url":"https://api.github.com/users/james0x0A/gists{/gist_id}","starred_url":"https://api.github.com/users/james0x0A/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james0x0A/subscriptions","organizations_url":"https://api.github.com/users/james0x0A/orgs","repos_url":"https://api.github.com/users/james0x0A/repos","events_url":"https://api.github.com/users/james0x0A/events{/privacy}","received_events_url":"https://api.github.com/users/james0x0A/received_events","type":"User","site_admin":false},"labels":[{"id":96643357,"url":"https://api.github.com/repos/LambdaSix/InfiniMap/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-31T23:30:11Z","updated_at":"2017-04-01T00:35:14Z","closed_at":null,"body":"The current mapping is _blocks[blockX + _chunkWidth * (blockY + _chunkDepth * blockZ)\r\n\r\n\r\nblockX + _chunkWidth * (blockY + _chunkDepth * blockZ) \r\n = X + Y_SIZE * ( Y + Z_SIZE * Z) \r\n = X + ( Y  * Y_SIZE ) + ( Z * Y SIZE * Z_SIZE )\r\n\r\nThis does not map correctly unless  the chunk is a perfect cube or square.\r\n\r\nTo map  a general cuboid space, instead use :\r\nX + Y * X_SIZE + Z * X_SIZE * Y_SIZE\r\n= X + ( Y  +  Z   *  Y_SIZE)  *  X_SIZE\r\n= blockX +  (blockY +  blockZ  * _chunkWidth ) * _chunkHeight  \r\n\r\n_blocks[blockX +  (blockY +  blockZ  * _chunkWidth ) * _chunkHeight]\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/comments/290879028","html_url":"https://github.com/LambdaSix/InfiniMap/issues/12#issuecomment-290879028","issue_url":"https://api.github.com/repos/LambdaSix/InfiniMap/issues/12","id":290879028,"user":{"login":"LambdaSix","id":1358406,"avatar_url":"https://avatars2.githubusercontent.com/u/1358406?v=3","gravatar_id":"","url":"https://api.github.com/users/LambdaSix","html_url":"https://github.com/LambdaSix","followers_url":"https://api.github.com/users/LambdaSix/followers","following_url":"https://api.github.com/users/LambdaSix/following{/other_user}","gists_url":"https://api.github.com/users/LambdaSix/gists{/gist_id}","starred_url":"https://api.github.com/users/LambdaSix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LambdaSix/subscriptions","organizations_url":"https://api.github.com/users/LambdaSix/orgs","repos_url":"https://api.github.com/users/LambdaSix/repos","events_url":"https://api.github.com/users/LambdaSix/events{/privacy}","received_events_url":"https://api.github.com/users/LambdaSix/received_events","type":"User","site_admin":false},"created_at":"2017-04-01T00:35:14Z","updated_at":"2017-04-01T00:35:14Z","body":"The implicit assumption was always that a given chunk would be a cube/square of the same dimensions, but this seems like a general improvement that can be made."}}
{"actor":{"display_login":"LambdaSix"}}