{"action":"created","comment":{"url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/comments/144759830","pull_request_review_id":69458827,"id":144759830,"diff_hunk":"@@ -192,96 +190,80 @@ public static void poll() {\n     }\n \n     public static boolean isKeyDown(int key) {\n-\n-\n-            return keyDownBuffer.contains(key);\n-\n-\n+        return keyDownBuffer.contains(key);\n     }\n \n     public static synchronized String getKeyName(int key) {\n         return keyName[key];\n     }\n \n     public static synchronized int getKeyIndex(String keyName) {\n-        Integer ret = (Integer) keyMap.get(keyName);\n-        return ret == null ? 0 : ret.intValue();\n+        Integer ret = keyMap.get(keyName);\n+        return ret == null ? 0 : ret;\n     }\n \n \n     public static boolean next() {\n         key_press_event p = NovaNative.INSTANCE.get_next_key_press_event();\n         key_char_event c = NovaNative.INSTANCE.get_next_key_char_event();\n \n-        if (p.filled==0 && c.filled==0){\n+        if (p.filled == 0 && c.filled == 0) {\n             return false;\n         }\n-        if (p.filled==1 && p.key !=0 &&p.action!=2){\n-            if (p.action ==1){\n+        if (p.filled == 1 && p.key != 0 && p.action != 2) {\n+            if (p.action == 1) {\n                 keyDownBuffer.add(p.key);\n \n-            } else{\n+            } else {\n                 keyDownBuffer.remove(p.key);\n             }\n         }\n-        current_event.key = p.key;\n-        current_event.character = (char) c.unicode_char;\n-        current_event.state = p.action!=0;\n-        current_event.repeat = p.action == 2;\n+        currentEvent.key = p.key;\n+        currentEvent.character = (char) c.unicode_char;\n+        currentEvent.state = p.action != 0;\n+        currentEvent.repeat = p.action == 2;\n+\n         return true;\n     }\n \n \n     public static void enableRepeatEvents(boolean enable) {\n-\n         repeat_enabled = enable;\n-\n     }\n \n     public static char getEventCharacter() {\n-\n-        return  current_event.character;\n-\n+        return currentEvent.character;\n     }\n \n     public static int getEventKey() {\n-\n-        return current_event.key;\n-\n+        return currentEvent.key;\n     }\n \n     public static boolean getEventKeyState() {\n-\n-        return current_event.state;\n-\n+        return currentEvent.state;\n     }\n \n     public static boolean isRepeatEvent() {\n-\n-        return current_event.repeat;\n-\n+        return currentEvent.repeat;\n     }\n \n     static {\n-        Field[] fields = Keyboard.class.getFields();\n-\n         try {\n-            Field[] e = fields;\n-            int len$ = fields.length;\n-\n-            for (int i$ = 0; i$ < len$; ++i$) {\n-                Field field = e[i$];\n-                if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers()) && Modifier.isFinal(field.getModifiers()) && field.getType().equals(Integer.TYPE) && field.getName().startsWith(\"KEY_\") && !field.getName().endsWith(\"WIN\")) {\n-                    int key = field.getInt((Object) null);\n+            for (Field field : Keyboard.class.getFields()) {\n+                if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers()) &&\n+                        Modifier.isFinal(field.getModifiers()) && field.getType().equals(Integer.TYPE) &&\n+                        field.getName().startsWith(\"KEY_\") && !field.getName().endsWith(\"WIN\")) {","path":"src/main/java/com/continuum/nova/input/Keyboard.java","position":149,"original_position":149,"commit_id":"b74b7133a05e9022075abfc6d1b9bb0af72fc08c","original_commit_id":"b74b7133a05e9022075abfc6d1b9bb0af72fc08c","user":{"login":"DethRaid","id":2505597,"avatar_url":"https://avatars1.githubusercontent.com/u/2505597?v=4","gravatar_id":"","url":"https://api.github.com/users/DethRaid","html_url":"https://github.com/DethRaid","followers_url":"https://api.github.com/users/DethRaid/followers","following_url":"https://api.github.com/users/DethRaid/following{/other_user}","gists_url":"https://api.github.com/users/DethRaid/gists{/gist_id}","starred_url":"https://api.github.com/users/DethRaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DethRaid/subscriptions","organizations_url":"https://api.github.com/users/DethRaid/orgs","repos_url":"https://api.github.com/users/DethRaid/repos","events_url":"https://api.github.com/users/DethRaid/events{/privacy}","received_events_url":"https://api.github.com/users/DethRaid/received_events","type":"User","site_admin":false},"body":"This if statement is long and hard to read. Why not break it up so each condition is a different variable with a human-readable name?","created_at":"2017-10-16T05:54:13Z","updated_at":"2017-10-16T05:59:15Z","html_url":"https://github.com/NovaMods/nova-renderer/pull/81#discussion_r144759830","pull_request_url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/comments/144759830"},"html":{"href":"https://github.com/NovaMods/nova-renderer/pull/81#discussion_r144759830"},"pull_request":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81","id":146695078,"html_url":"https://github.com/NovaMods/nova-renderer/pull/81","diff_url":"https://github.com/NovaMods/nova-renderer/pull/81.diff","patch_url":"https://github.com/NovaMods/nova-renderer/pull/81.patch","issue_url":"https://api.github.com/repos/NovaMods/nova-renderer/issues/81","number":81,"state":"open","locked":false,"title":"Refactoring","user":{"login":"Plasticable","id":8087633,"avatar_url":"https://avatars3.githubusercontent.com/u/8087633?v=4","gravatar_id":"","url":"https://api.github.com/users/Plasticable","html_url":"https://github.com/Plasticable","followers_url":"https://api.github.com/users/Plasticable/followers","following_url":"https://api.github.com/users/Plasticable/following{/other_user}","gists_url":"https://api.github.com/users/Plasticable/gists{/gist_id}","starred_url":"https://api.github.com/users/Plasticable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plasticable/subscriptions","organizations_url":"https://api.github.com/users/Plasticable/orgs","repos_url":"https://api.github.com/users/Plasticable/repos","events_url":"https://api.github.com/users/Plasticable/events{/privacy}","received_events_url":"https://api.github.com/users/Plasticable/received_events","type":"User","site_admin":false},"body":"**Refactoring**: fixing warnings, trying to make code look more nice.","created_at":"2017-10-16T04:34:51Z","updated_at":"2017-10-16T05:59:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7be925d1151d3a4804223c93f96920b15a40aab3","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81/commits","review_comments_url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81/comments","review_comment_url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NovaMods/nova-renderer/issues/81/comments","statuses_url":"https://api.github.com/repos/NovaMods/nova-renderer/statuses/b74b7133a05e9022075abfc6d1b9bb0af72fc08c","head":{"label":"Plasticable:chunks","ref":"chunks","sha":"b74b7133a05e9022075abfc6d1b9bb0af72fc08c","user":{"login":"Plasticable","id":8087633,"avatar_url":"https://avatars3.githubusercontent.com/u/8087633?v=4","gravatar_id":"","url":"https://api.github.com/users/Plasticable","html_url":"https://github.com/Plasticable","followers_url":"https://api.github.com/users/Plasticable/followers","following_url":"https://api.github.com/users/Plasticable/following{/other_user}","gists_url":"https://api.github.com/users/Plasticable/gists{/gist_id}","starred_url":"https://api.github.com/users/Plasticable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plasticable/subscriptions","organizations_url":"https://api.github.com/users/Plasticable/orgs","repos_url":"https://api.github.com/users/Plasticable/repos","events_url":"https://api.github.com/users/Plasticable/events{/privacy}","received_events_url":"https://api.github.com/users/Plasticable/received_events","type":"User","site_admin":false},"repo":{"id":107066448,"name":"nova-renderer","full_name":"Plasticable/nova-renderer","owner":{"login":"Plasticable","id":8087633,"avatar_url":"https://avatars3.githubusercontent.com/u/8087633?v=4","gravatar_id":"","url":"https://api.github.com/users/Plasticable","html_url":"https://github.com/Plasticable","followers_url":"https://api.github.com/users/Plasticable/followers","following_url":"https://api.github.com/users/Plasticable/following{/other_user}","gists_url":"https://api.github.com/users/Plasticable/gists{/gist_id}","starred_url":"https://api.github.com/users/Plasticable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plasticable/subscriptions","organizations_url":"https://api.github.com/users/Plasticable/orgs","repos_url":"https://api.github.com/users/Plasticable/repos","events_url":"https://api.github.com/users/Plasticable/events{/privacy}","received_events_url":"https://api.github.com/users/Plasticable/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Plasticable/nova-renderer","description":"A mod to replace Minecraft's renderer with an OpenGL 4.5 renderer written in C++. A project of Continuum Graphics LLC","fork":true,"url":"https://api.github.com/repos/Plasticable/nova-renderer","forks_url":"https://api.github.com/repos/Plasticable/nova-renderer/forks","keys_url":"https://api.github.com/repos/Plasticable/nova-renderer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Plasticable/nova-renderer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Plasticable/nova-renderer/teams","hooks_url":"https://api.github.com/repos/Plasticable/nova-renderer/hooks","issue_events_url":"https://api.github.com/repos/Plasticable/nova-renderer/issues/events{/number}","events_url":"https://api.github.com/repos/Plasticable/nova-renderer/events","assignees_url":"https://api.github.com/repos/Plasticable/nova-renderer/assignees{/user}","branches_url":"https://api.github.com/repos/Plasticable/nova-renderer/branches{/branch}","tags_url":"https://api.github.com/repos/Plasticable/nova-renderer/tags","blobs_url":"https://api.github.com/repos/Plasticable/nova-renderer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Plasticable/nova-renderer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Plasticable/nova-renderer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Plasticable/nova-renderer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Plasticable/nova-renderer/statuses/{sha}","languages_url":"https://api.github.com/repos/Plasticable/nova-renderer/languages","stargazers_url":"https://api.github.com/repos/Plasticable/nova-renderer/stargazers","contributors_url":"https://api.github.com/repos/Plasticable/nova-renderer/contributors","subscribers_url":"https://api.github.com/repos/Plasticable/nova-renderer/subscribers","subscription_url":"https://api.github.com/repos/Plasticable/nova-renderer/subscription","commits_url":"https://api.github.com/repos/Plasticable/nova-renderer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Plasticable/nova-renderer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Plasticable/nova-renderer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Plasticable/nova-renderer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Plasticable/nova-renderer/contents/{+path}","compare_url":"https://api.github.com/repos/Plasticable/nova-renderer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Plasticable/nova-renderer/merges","archive_url":"https://api.github.com/repos/Plasticable/nova-renderer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Plasticable/nova-renderer/downloads","issues_url":"https://api.github.com/repos/Plasticable/nova-renderer/issues{/number}","pulls_url":"https://api.github.com/repos/Plasticable/nova-renderer/pulls{/number}","milestones_url":"https://api.github.com/repos/Plasticable/nova-renderer/milestones{/number}","notifications_url":"https://api.github.com/repos/Plasticable/nova-renderer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Plasticable/nova-renderer/labels{/name}","releases_url":"https://api.github.com/repos/Plasticable/nova-renderer/releases{/id}","deployments_url":"https://api.github.com/repos/Plasticable/nova-renderer/deployments","created_at":"2017-10-16T02:02:35Z","updated_at":"2017-10-16T02:02:37Z","pushed_at":"2017-10-16T04:29:47Z","git_url":"git://github.com/Plasticable/nova-renderer.git","ssh_url":"git@github.com:Plasticable/nova-renderer.git","clone_url":"https://github.com/Plasticable/nova-renderer.git","svn_url":"https://github.com/Plasticable/nova-renderer","homepage":"https://continuum.graphics/nova/","size":15702,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NovaMods:chunks","ref":"chunks","sha":"b2457d623c12f11069c2dc054d22a243ae55e507","user":{"login":"NovaMods","id":20215682,"avatar_url":"https://avatars2.githubusercontent.com/u/20215682?v=4","gravatar_id":"","url":"https://api.github.com/users/NovaMods","html_url":"https://github.com/NovaMods","followers_url":"https://api.github.com/users/NovaMods/followers","following_url":"https://api.github.com/users/NovaMods/following{/other_user}","gists_url":"https://api.github.com/users/NovaMods/gists{/gist_id}","starred_url":"https://api.github.com/users/NovaMods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NovaMods/subscriptions","organizations_url":"https://api.github.com/users/NovaMods/orgs","repos_url":"https://api.github.com/users/NovaMods/repos","events_url":"https://api.github.com/users/NovaMods/events{/privacy}","received_events_url":"https://api.github.com/users/NovaMods/received_events","type":"Organization","site_admin":false},"repo":{"id":48705171,"name":"nova-renderer","full_name":"NovaMods/nova-renderer","owner":{"login":"NovaMods","id":20215682,"avatar_url":"https://avatars2.githubusercontent.com/u/20215682?v=4","gravatar_id":"","url":"https://api.github.com/users/NovaMods","html_url":"https://github.com/NovaMods","followers_url":"https://api.github.com/users/NovaMods/followers","following_url":"https://api.github.com/users/NovaMods/following{/other_user}","gists_url":"https://api.github.com/users/NovaMods/gists{/gist_id}","starred_url":"https://api.github.com/users/NovaMods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NovaMods/subscriptions","organizations_url":"https://api.github.com/users/NovaMods/orgs","repos_url":"https://api.github.com/users/NovaMods/repos","events_url":"https://api.github.com/users/NovaMods/events{/privacy}","received_events_url":"https://api.github.com/users/NovaMods/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NovaMods/nova-renderer","description":"A mod to replace Minecraft's renderer with an OpenGL 4.5 renderer written in C++. A project of Continuum Graphics LLC","fork":false,"url":"https://api.github.com/repos/NovaMods/nova-renderer","forks_url":"https://api.github.com/repos/NovaMods/nova-renderer/forks","keys_url":"https://api.github.com/repos/NovaMods/nova-renderer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NovaMods/nova-renderer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NovaMods/nova-renderer/teams","hooks_url":"https://api.github.com/repos/NovaMods/nova-renderer/hooks","issue_events_url":"https://api.github.com/repos/NovaMods/nova-renderer/issues/events{/number}","events_url":"https://api.github.com/repos/NovaMods/nova-renderer/events","assignees_url":"https://api.github.com/repos/NovaMods/nova-renderer/assignees{/user}","branches_url":"https://api.github.com/repos/NovaMods/nova-renderer/branches{/branch}","tags_url":"https://api.github.com/repos/NovaMods/nova-renderer/tags","blobs_url":"https://api.github.com/repos/NovaMods/nova-renderer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NovaMods/nova-renderer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NovaMods/nova-renderer/git/refs{/sha}","trees_url":"https://api.github.com/repos/NovaMods/nova-renderer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NovaMods/nova-renderer/statuses/{sha}","languages_url":"https://api.github.com/repos/NovaMods/nova-renderer/languages","stargazers_url":"https://api.github.com/repos/NovaMods/nova-renderer/stargazers","contributors_url":"https://api.github.com/repos/NovaMods/nova-renderer/contributors","subscribers_url":"https://api.github.com/repos/NovaMods/nova-renderer/subscribers","subscription_url":"https://api.github.com/repos/NovaMods/nova-renderer/subscription","commits_url":"https://api.github.com/repos/NovaMods/nova-renderer/commits{/sha}","git_commits_url":"https://api.github.com/repos/NovaMods/nova-renderer/git/commits{/sha}","comments_url":"https://api.github.com/repos/NovaMods/nova-renderer/comments{/number}","issue_comment_url":"https://api.github.com/repos/NovaMods/nova-renderer/issues/comments{/number}","contents_url":"https://api.github.com/repos/NovaMods/nova-renderer/contents/{+path}","compare_url":"https://api.github.com/repos/NovaMods/nova-renderer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NovaMods/nova-renderer/merges","archive_url":"https://api.github.com/repos/NovaMods/nova-renderer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NovaMods/nova-renderer/downloads","issues_url":"https://api.github.com/repos/NovaMods/nova-renderer/issues{/number}","pulls_url":"https://api.github.com/repos/NovaMods/nova-renderer/pulls{/number}","milestones_url":"https://api.github.com/repos/NovaMods/nova-renderer/milestones{/number}","notifications_url":"https://api.github.com/repos/NovaMods/nova-renderer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NovaMods/nova-renderer/labels{/name}","releases_url":"https://api.github.com/repos/NovaMods/nova-renderer/releases{/id}","deployments_url":"https://api.github.com/repos/NovaMods/nova-renderer/deployments","created_at":"2015-12-28T17:56:33Z","updated_at":"2017-10-15T21:15:51Z","pushed_at":"2017-10-16T04:34:51Z","git_url":"git://github.com/NovaMods/nova-renderer.git","ssh_url":"git@github.com:NovaMods/nova-renderer.git","clone_url":"https://github.com/NovaMods/nova-renderer.git","svn_url":"https://github.com/NovaMods/nova-renderer","homepage":"https://continuum.graphics/nova/","size":15685,"stargazers_count":250,"watchers_count":250,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":21,"forks":23,"open_issues":21,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81"},"html":{"href":"https://github.com/NovaMods/nova-renderer/pull/81"},"issue":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/issues/81"},"comments":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/NovaMods/nova-renderer/statuses/b74b7133a05e9022075abfc6d1b9bb0af72fc08c"}},"author_association":"NONE"}}
{"actor":{"display_login":"DethRaid"}}