{"action":"created","issue":{"url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/66","labels_url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/66/comments","events_url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/66/events","html_url":"https://github.com/GlowstoneMC/Glowkit/pull/66","id":55196927,"number":66,"title":"Add/Fix methods for occupied state in Bed MaterialData","user":{"login":"Johni0702","id":818778,"avatar_url":"https://avatars.githubusercontent.com/u/818778?v=3","gravatar_id":"","url":"https://api.github.com/users/Johni0702","html_url":"https://github.com/Johni0702","followers_url":"https://api.github.com/users/Johni0702/followers","following_url":"https://api.github.com/users/Johni0702/following{/other_user}","gists_url":"https://api.github.com/users/Johni0702/gists{/gist_id}","starred_url":"https://api.github.com/users/Johni0702/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johni0702/subscriptions","organizations_url":"https://api.github.com/users/Johni0702/orgs","repos_url":"https://api.github.com/users/Johni0702/repos","events_url":"https://api.github.com/users/Johni0702/events{/privacy}","received_events_url":"https://api.github.com/users/Johni0702/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-22T19:25:26Z","updated_at":"2015-01-23T03:05:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GlowstoneMC/Glowkit/pulls/66","html_url":"https://github.com/GlowstoneMC/Glowkit/pull/66","diff_url":"https://github.com/GlowstoneMC/Glowkit/pull/66.diff","patch_url":"https://github.com/GlowstoneMC/Glowkit/pull/66.patch"},"body":"#### The Issue:\r\nCurrently there is no way to set whether a bed is occupied. Setting it using `Block.setData(byte)` does not work either (and is deprecated).\r\n\r\nNeither is it possible to do this in Glowstone itself as the `setFacingDirection` overrides the the occupied flag and the `getFacingDirection` produces incorrect results due to using a 3 bits mask (`& 0x7`) instead of the necessary 2 bit mask (`& 0x3`).\r\n\r\n#### PR Breakdown:\r\nThis PR adds methods to set and get whether a bed is occupied.\r\nIt also fixes the `getFacingDirection` method by using the correct bit mask and the `setFacingDirection` by modifying the current data value instead of recalculating it.\r\nAll changes should be backwards compatible.\r\n\r\nWhile the new methods introduced can be omitted, the fixes for the other two methods are mandatory for correctly implementing beds in Glowstone."},"comment":{"url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/comments/71141002","html_url":"https://github.com/GlowstoneMC/Glowkit/pull/66#issuecomment-71141002","issue_url":"https://api.github.com/repos/GlowstoneMC/Glowkit/issues/66","id":71141002,"user":{"login":"turt2live","id":1190097,"avatar_url":"https://avatars.githubusercontent.com/u/1190097?v=3","gravatar_id":"","url":"https://api.github.com/users/turt2live","html_url":"https://github.com/turt2live","followers_url":"https://api.github.com/users/turt2live/followers","following_url":"https://api.github.com/users/turt2live/following{/other_user}","gists_url":"https://api.github.com/users/turt2live/gists{/gist_id}","starred_url":"https://api.github.com/users/turt2live/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turt2live/subscriptions","organizations_url":"https://api.github.com/users/turt2live/orgs","repos_url":"https://api.github.com/users/turt2live/repos","events_url":"https://api.github.com/users/turt2live/events{/privacy}","received_events_url":"https://api.github.com/users/turt2live/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T03:05:53Z","updated_at":"2015-01-23T03:05:53Z","body":"Without doing heavy review that does appear to be the solution, yes. "}}