{"action":"created","comment":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments/129732698","pull_request_review_id":52535941,"id":129732698,"diff_hunk":"@@ -875,13 +900,13 @@ private void updateArmorDamage(final double damage)\n     {\n         for (final ItemStack stack : this.getArmorInventoryList())\n         {\n-            if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ItemArmor))\n+            if (ItemStackUtils.isEmpty(stack) || !(stack.getItem() instanceof ItemArmor))\n             {\n                 continue;\n             }\n             stack.damageItem((int) (damage / 2), this);\n \n-            if (stack.stackSize < 1)\n+            if (ItemStackUtils.getSize(stack) < 1)","path":"src/main/java/com/minecolonies/coremod/entity/EntityCitizen.java","position":189,"original_position":189,"commit_id":"cdb2f2f5e94f4fb9d998295b83bd3017f975683e","original_commit_id":"cdb2f2f5e94f4fb9d998295b83bd3017f975683e","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid using Literals in Conditional Statements](https://www.codacy.com/app/Minecolonies/minecolonies/pullRequest?prid=800557)","created_at":"2017-07-27T01:00:14Z","updated_at":"2017-07-27T01:00:14Z","html_url":"https://github.com/Minecolonies/minecolonies/pull/1321#discussion_r129732698","pull_request_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321","_links":{"self":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments/129732698"},"html":{"href":"https://github.com/Minecolonies/minecolonies/pull/1321#discussion_r129732698"},"pull_request":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321"}}},"pull_request":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321","id":132645472,"html_url":"https://github.com/Minecolonies/minecolonies/pull/1321","diff_url":"https://github.com/Minecolonies/minecolonies/pull/1321.diff","patch_url":"https://github.com/Minecolonies/minecolonies/pull/1321.patch","issue_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1321","number":1321,"state":"open","locked":false,"title":"Xp changes","user":{"login":"Vitridax","id":5359560,"avatar_url":"https://avatars0.githubusercontent.com/u/5359560?v=4","gravatar_id":"","url":"https://api.github.com/users/Vitridax","html_url":"https://github.com/Vitridax","followers_url":"https://api.github.com/users/Vitridax/followers","following_url":"https://api.github.com/users/Vitridax/following{/other_user}","gists_url":"https://api.github.com/users/Vitridax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitridax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitridax/subscriptions","organizations_url":"https://api.github.com/users/Vitridax/orgs","repos_url":"https://api.github.com/users/Vitridax/repos","events_url":"https://api.github.com/users/Vitridax/events{/privacy}","received_events_url":"https://api.github.com/users/Vitridax/received_events","type":"User","site_admin":false},"body":"Closes #1319 \r\n\r\n# Changes proposed in this pull request:\r\n- Builders gain xp for placing blocks.\r\n- Builders build faster based on their level. (lv0 = default, lv 50 = 6x faster).\r\n- Equipped/Held items with mending enchant repair with xp.\r\n- Small bugfix where max cit level is too high. (9 when it should be 8 for lv 2 hut)\r\n\r\nReview please\r\n","created_at":"2017-07-27T00:57:39Z","updated_at":"2017-07-27T01:00:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321/commits","review_comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321/comments","review_comment_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1321/comments","statuses_url":"https://api.github.com/repos/Minecolonies/minecolonies/statuses/cdb2f2f5e94f4fb9d998295b83bd3017f975683e","head":{"label":"Vitridax:XpChanges","ref":"XpChanges","sha":"cdb2f2f5e94f4fb9d998295b83bd3017f975683e","user":{"login":"Vitridax","id":5359560,"avatar_url":"https://avatars0.githubusercontent.com/u/5359560?v=4","gravatar_id":"","url":"https://api.github.com/users/Vitridax","html_url":"https://github.com/Vitridax","followers_url":"https://api.github.com/users/Vitridax/followers","following_url":"https://api.github.com/users/Vitridax/following{/other_user}","gists_url":"https://api.github.com/users/Vitridax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitridax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitridax/subscriptions","organizations_url":"https://api.github.com/users/Vitridax/orgs","repos_url":"https://api.github.com/users/Vitridax/repos","events_url":"https://api.github.com/users/Vitridax/events{/privacy}","received_events_url":"https://api.github.com/users/Vitridax/received_events","type":"User","site_admin":false},"repo":{"id":98475942,"name":"minecolonies","full_name":"Vitridax/minecolonies","owner":{"login":"Vitridax","id":5359560,"avatar_url":"https://avatars0.githubusercontent.com/u/5359560?v=4","gravatar_id":"","url":"https://api.github.com/users/Vitridax","html_url":"https://github.com/Vitridax","followers_url":"https://api.github.com/users/Vitridax/followers","following_url":"https://api.github.com/users/Vitridax/following{/other_user}","gists_url":"https://api.github.com/users/Vitridax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitridax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitridax/subscriptions","organizations_url":"https://api.github.com/users/Vitridax/orgs","repos_url":"https://api.github.com/users/Vitridax/repos","events_url":"https://api.github.com/users/Vitridax/events{/privacy}","received_events_url":"https://api.github.com/users/Vitridax/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vitridax/minecolonies","description":"Minecolonies minecraft mod","fork":true,"url":"https://api.github.com/repos/Vitridax/minecolonies","forks_url":"https://api.github.com/repos/Vitridax/minecolonies/forks","keys_url":"https://api.github.com/repos/Vitridax/minecolonies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vitridax/minecolonies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vitridax/minecolonies/teams","hooks_url":"https://api.github.com/repos/Vitridax/minecolonies/hooks","issue_events_url":"https://api.github.com/repos/Vitridax/minecolonies/issues/events{/number}","events_url":"https://api.github.com/repos/Vitridax/minecolonies/events","assignees_url":"https://api.github.com/repos/Vitridax/minecolonies/assignees{/user}","branches_url":"https://api.github.com/repos/Vitridax/minecolonies/branches{/branch}","tags_url":"https://api.github.com/repos/Vitridax/minecolonies/tags","blobs_url":"https://api.github.com/repos/Vitridax/minecolonies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vitridax/minecolonies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vitridax/minecolonies/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vitridax/minecolonies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vitridax/minecolonies/statuses/{sha}","languages_url":"https://api.github.com/repos/Vitridax/minecolonies/languages","stargazers_url":"https://api.github.com/repos/Vitridax/minecolonies/stargazers","contributors_url":"https://api.github.com/repos/Vitridax/minecolonies/contributors","subscribers_url":"https://api.github.com/repos/Vitridax/minecolonies/subscribers","subscription_url":"https://api.github.com/repos/Vitridax/minecolonies/subscription","commits_url":"https://api.github.com/repos/Vitridax/minecolonies/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vitridax/minecolonies/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vitridax/minecolonies/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vitridax/minecolonies/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vitridax/minecolonies/contents/{+path}","compare_url":"https://api.github.com/repos/Vitridax/minecolonies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vitridax/minecolonies/merges","archive_url":"https://api.github.com/repos/Vitridax/minecolonies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vitridax/minecolonies/downloads","issues_url":"https://api.github.com/repos/Vitridax/minecolonies/issues{/number}","pulls_url":"https://api.github.com/repos/Vitridax/minecolonies/pulls{/number}","milestones_url":"https://api.github.com/repos/Vitridax/minecolonies/milestones{/number}","notifications_url":"https://api.github.com/repos/Vitridax/minecolonies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vitridax/minecolonies/labels{/name}","releases_url":"https://api.github.com/repos/Vitridax/minecolonies/releases{/id}","deployments_url":"https://api.github.com/repos/Vitridax/minecolonies/deployments","created_at":"2017-07-27T00:14:07Z","updated_at":"2017-07-27T00:14:10Z","pushed_at":"2017-07-27T00:48:15Z","git_url":"git://github.com/Vitridax/minecolonies.git","ssh_url":"git@github.com:Vitridax/minecolonies.git","clone_url":"https://github.com/Vitridax/minecolonies.git","svn_url":"https://github.com/Vitridax/minecolonies","homepage":"http://minecolonies.com/","size":23305,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"version/1.11"}},"base":{"label":"Minecolonies:release/1.10","ref":"release/1.10","sha":"28ac1f3c75ae7d43cceee52621725887f9748587","user":{"login":"Minecolonies","id":5167336,"avatar_url":"https://avatars3.githubusercontent.com/u/5167336?v=4","gravatar_id":"","url":"https://api.github.com/users/Minecolonies","html_url":"https://github.com/Minecolonies","followers_url":"https://api.github.com/users/Minecolonies/followers","following_url":"https://api.github.com/users/Minecolonies/following{/other_user}","gists_url":"https://api.github.com/users/Minecolonies/gists{/gist_id}","starred_url":"https://api.github.com/users/Minecolonies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minecolonies/subscriptions","organizations_url":"https://api.github.com/users/Minecolonies/orgs","repos_url":"https://api.github.com/users/Minecolonies/repos","events_url":"https://api.github.com/users/Minecolonies/events{/privacy}","received_events_url":"https://api.github.com/users/Minecolonies/received_events","type":"Organization","site_admin":false},"repo":{"id":65616760,"name":"minecolonies","full_name":"Minecolonies/minecolonies","owner":{"login":"Minecolonies","id":5167336,"avatar_url":"https://avatars3.githubusercontent.com/u/5167336?v=4","gravatar_id":"","url":"https://api.github.com/users/Minecolonies","html_url":"https://github.com/Minecolonies","followers_url":"https://api.github.com/users/Minecolonies/followers","following_url":"https://api.github.com/users/Minecolonies/following{/other_user}","gists_url":"https://api.github.com/users/Minecolonies/gists{/gist_id}","starred_url":"https://api.github.com/users/Minecolonies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minecolonies/subscriptions","organizations_url":"https://api.github.com/users/Minecolonies/orgs","repos_url":"https://api.github.com/users/Minecolonies/repos","events_url":"https://api.github.com/users/Minecolonies/events{/privacy}","received_events_url":"https://api.github.com/users/Minecolonies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Minecolonies/minecolonies","description":"Minecolonies minecraft mod","fork":false,"url":"https://api.github.com/repos/Minecolonies/minecolonies","forks_url":"https://api.github.com/repos/Minecolonies/minecolonies/forks","keys_url":"https://api.github.com/repos/Minecolonies/minecolonies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Minecolonies/minecolonies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Minecolonies/minecolonies/teams","hooks_url":"https://api.github.com/repos/Minecolonies/minecolonies/hooks","issue_events_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/events{/number}","events_url":"https://api.github.com/repos/Minecolonies/minecolonies/events","assignees_url":"https://api.github.com/repos/Minecolonies/minecolonies/assignees{/user}","branches_url":"https://api.github.com/repos/Minecolonies/minecolonies/branches{/branch}","tags_url":"https://api.github.com/repos/Minecolonies/minecolonies/tags","blobs_url":"https://api.github.com/repos/Minecolonies/minecolonies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Minecolonies/minecolonies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Minecolonies/minecolonies/git/refs{/sha}","trees_url":"https://api.github.com/repos/Minecolonies/minecolonies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Minecolonies/minecolonies/statuses/{sha}","languages_url":"https://api.github.com/repos/Minecolonies/minecolonies/languages","stargazers_url":"https://api.github.com/repos/Minecolonies/minecolonies/stargazers","contributors_url":"https://api.github.com/repos/Minecolonies/minecolonies/contributors","subscribers_url":"https://api.github.com/repos/Minecolonies/minecolonies/subscribers","subscription_url":"https://api.github.com/repos/Minecolonies/minecolonies/subscription","commits_url":"https://api.github.com/repos/Minecolonies/minecolonies/commits{/sha}","git_commits_url":"https://api.github.com/repos/Minecolonies/minecolonies/git/commits{/sha}","comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/comments{/number}","issue_comment_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/comments{/number}","contents_url":"https://api.github.com/repos/Minecolonies/minecolonies/contents/{+path}","compare_url":"https://api.github.com/repos/Minecolonies/minecolonies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Minecolonies/minecolonies/merges","archive_url":"https://api.github.com/repos/Minecolonies/minecolonies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Minecolonies/minecolonies/downloads","issues_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues{/number}","pulls_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls{/number}","milestones_url":"https://api.github.com/repos/Minecolonies/minecolonies/milestones{/number}","notifications_url":"https://api.github.com/repos/Minecolonies/minecolonies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Minecolonies/minecolonies/labels{/name}","releases_url":"https://api.github.com/repos/Minecolonies/minecolonies/releases{/id}","deployments_url":"https://api.github.com/repos/Minecolonies/minecolonies/deployments","created_at":"2016-08-13T12:45:38Z","updated_at":"2017-07-16T21:49:33Z","pushed_at":"2017-07-27T00:57:40Z","git_url":"git://github.com/Minecolonies/minecolonies.git","ssh_url":"git@github.com:Minecolonies/minecolonies.git","clone_url":"https://github.com/Minecolonies/minecolonies.git","svn_url":"https://github.com/Minecolonies/minecolonies","homepage":"http://minecolonies.com/","size":23305,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":144,"forks":40,"open_issues":144,"watchers":48,"default_branch":"version/1.11"}},"_links":{"self":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321"},"html":{"href":"https://github.com/Minecolonies/minecolonies/pull/1321"},"issue":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1321"},"comments":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1321/comments"},"review_comments":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321/comments"},"review_comment":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1321/commits"},"statuses":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/statuses/cdb2f2f5e94f4fb9d998295b83bd3017f975683e"}}}}
{"actor":{"display_login":"codacy-bot"}}