{"action":"created","issue":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/3090","repository_url":"https://api.github.com/repos/cuberite/cuberite","labels_url":"https://api.github.com/repos/cuberite/cuberite/issues/3090/labels{/name}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/3090/comments","events_url":"https://api.github.com/repos/cuberite/cuberite/issues/3090/events","html_url":"https://github.com/cuberite/cuberite/pull/3090","id":143298888,"number":3090,"title":"Out of world","user":{"login":"LogicParrot","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/LogicParrot","html_url":"https://github.com/LogicParrot","followers_url":"https://api.github.com/users/LogicParrot/followers","following_url":"https://api.github.com/users/LogicParrot/following{/other_user}","gists_url":"https://api.github.com/users/LogicParrot/gists{/gist_id}","starred_url":"https://api.github.com/users/LogicParrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogicParrot/subscriptions","organizations_url":"https://api.github.com/users/LogicParrot/orgs","repos_url":"https://api.github.com/users/LogicParrot/repos","events_url":"https://api.github.com/users/LogicParrot/events{/privacy}","received_events_url":"https://api.github.com/users/LogicParrot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2016-03-24T16:48:52Z","updated_at":"2016-04-23T01:53:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/3090","html_url":"https://github.com/cuberite/cuberite/pull/3090","diff_url":"https://github.com/cuberite/cuberite/pull/3090.diff","patch_url":"https://github.com/cuberite/cuberite/pull/3090.patch"},"body":"Please discuss this before merging.\r\n\r\nThis PR entirely eliminates the good old \"block out of bounds\" assertion failures by actually removing these assertions. Whenever a blocks with a negative y value or a too high y value is requested, it is considered an air block (because it is actually an air block) rather than asserting.\r\nAlso, non player entities immediately self destruct when their y becomes negative.\r\n\r\n**Edit:** I've decided to sum up all my comments here:\r\n\r\n- Currently, calling Getblock with a negative (or Too big) height causes an assertion failure.\r\n- In my opinion, calling `GetBlock` with a negative height is not an error at all. It should simply return an air block. All heights should valid for reading (But not for writing). A pathfinder **should** treat a hole in the bedrock just like any other hole. In other words, treat it as air. This applies to all other parts of Cuberite that I've dealt with. So, returning air should be safe for negative heights.\r\n- Currently, most of the GetBlock calls have guarding code: `if Y < 0 || Y too big do not call GetBlock`. The pathfinder even has this:  `if Y < 0 || Y too big do returned air; else return whatever getblock() returns;`. The only purpose of all that guard code is evading an assert which, in my opinion, shouldn't have been there.\r\n"},"comment":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/comments/213647744","html_url":"https://github.com/cuberite/cuberite/pull/3090#issuecomment-213647744","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/3090","id":213647744,"user":{"login":"worktycho","id":2102806,"avatar_url":"https://avatars.githubusercontent.com/u/2102806?v=3","gravatar_id":"","url":"https://api.github.com/users/worktycho","html_url":"https://github.com/worktycho","followers_url":"https://api.github.com/users/worktycho/followers","following_url":"https://api.github.com/users/worktycho/following{/other_user}","gists_url":"https://api.github.com/users/worktycho/gists{/gist_id}","starred_url":"https://api.github.com/users/worktycho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worktycho/subscriptions","organizations_url":"https://api.github.com/users/worktycho/orgs","repos_url":"https://api.github.com/users/worktycho/repos","events_url":"https://api.github.com/users/worktycho/events{/privacy}","received_events_url":"https://api.github.com/users/worktycho/received_events","type":"User","site_admin":false},"created_at":"2016-04-23T01:53:03Z","updated_at":"2016-04-23T01:53:03Z","body":"I say merge."}}