{"action":"created","comment":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments/90349187","pull_request_review_id":10869624,"id":90349187,"diff_hunk":"@@ -444,55 +474,67 @@ private AIState clearStep()\n \n     private AIState requestMaterials()\n     {\n-        if(job.getStructure() == null)\n+        if (job.getStructure() == null)\n         {\n             //fix for bad structures\n             job.complete();\n         }\n \n-        //todo as soon as material handling has been implemented this should be set to work!\n         //We need to deal with materials\n-        if (!Configurations.builderInfiniteResources)\n+        if (!Configurations.builderInfiniteResources && !job.getWorkOrder().isRequested())\n         {\n-            //TODO thread this\n             while (job.getStructure().findNextBlock())\n             {\n                 if (job.getStructure().doesStructureBlockEqualWorldBlock())\n                 {\n                     continue;\n                 }\n \n-                @Nullable Block block = job.getStructure().getBlock();\n-                @NotNull ItemStack itemstack = new ItemStack(block, 1);\n+                @Nullable final Block block = job.getStructure().getBlock();\n \n-                Block worldBlock = BlockPosUtil.getBlock(world, job.getStructure().getBlockPosition());\n+                @NotNull final ItemStack itemstack = new ItemStack(block, 1);","path":"src/main/java/com/minecolonies/entity/ai/citizen/builder/EntityAIStructureBuilder.java","position":411,"original_position":411,"commit_id":"e1adfb55115f5c4b9b257c5d2b5db0d0d1282f23","original_commit_id":"e1adfb55115f5c4b9b257c5d2b5db0d0d1282f23","user":{"login":"MinecoloniesSonar","id":19393044,"avatar_url":"https://avatars.githubusercontent.com/u/19393044?v=3","gravatar_id":"","url":"https://api.github.com/users/MinecoloniesSonar","html_url":"https://github.com/MinecoloniesSonar","followers_url":"https://api.github.com/users/MinecoloniesSonar/followers","following_url":"https://api.github.com/users/MinecoloniesSonar/following{/other_user}","gists_url":"https://api.github.com/users/MinecoloniesSonar/gists{/gist_id}","starred_url":"https://api.github.com/users/MinecoloniesSonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinecoloniesSonar/subscriptions","organizations_url":"https://api.github.com/users/MinecoloniesSonar/orgs","repos_url":"https://api.github.com/users/MinecoloniesSonar/repos","events_url":"https://api.github.com/users/MinecoloniesSonar/events{/privacy}","received_events_url":"https://api.github.com/users/MinecoloniesSonar/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Remove this unused \"itemstack\" local variable. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://home.kk-sc.de:9000/coding_rules#rule_key=squid%3AS1481)\n![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Remove this useless assignment to local variable \"itemstack\". [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://home.kk-sc.de:9000/coding_rules#rule_key=squid%3AS1854)\n","created_at":"2016-11-30T23:02:10Z","updated_at":"2016-11-30T23:02:10Z","html_url":"https://github.com/Minecolonies/minecolonies/pull/306#discussion_r90349187","pull_request_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306","_links":{"self":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments/90349187"},"html":{"href":"https://github.com/Minecolonies/minecolonies/pull/306#discussion_r90349187"},"pull_request":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306"}}},"pull_request":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306","id":95569094,"html_url":"https://github.com/Minecolonies/minecolonies/pull/306","diff_url":"https://github.com/Minecolonies/minecolonies/pull/306.diff","patch_url":"https://github.com/Minecolonies/minecolonies/pull/306.patch","issue_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/306","number":306,"state":"open","locked":false,"title":"Feature/#99guards","user":{"login":"Raycoms","id":6438347,"avatar_url":"https://avatars.githubusercontent.com/u/6438347?v=3","gravatar_id":"","url":"https://api.github.com/users/Raycoms","html_url":"https://github.com/Raycoms","followers_url":"https://api.github.com/users/Raycoms/followers","following_url":"https://api.github.com/users/Raycoms/following{/other_user}","gists_url":"https://api.github.com/users/Raycoms/gists{/gist_id}","starred_url":"https://api.github.com/users/Raycoms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raycoms/subscriptions","organizations_url":"https://api.github.com/users/Raycoms/orgs","repos_url":"https://api.github.com/users/Raycoms/repos","events_url":"https://api.github.com/users/Raycoms/events{/privacy}","received_events_url":"https://api.github.com/users/Raycoms/received_events","type":"User","site_admin":false},"body":"Closes #281 \r\n\r\n# Changes proposed in this pull request:\r\n- Guards are smarter and more versatile.\r\n- Lots of new GUI options.\r\n- More tasks and smarter decisions.\r\n\r\nReview please\r\n","created_at":"2016-11-28T20:17:49Z","updated_at":"2016-11-30T23:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5e481c0c1cf5c018d132fea5c5dec321fe5e3df","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306/commits","review_comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306/comments","review_comment_url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/306/comments","statuses_url":"https://api.github.com/repos/Minecolonies/minecolonies/statuses/e1adfb55115f5c4b9b257c5d2b5db0d0d1282f23","head":{"label":"Minecolonies:feature/#99guards","ref":"feature/#99guards","sha":"e1adfb55115f5c4b9b257c5d2b5db0d0d1282f23","user":{"login":"Minecolonies","id":5167336,"avatar_url":"https://avatars.githubusercontent.com/u/5167336?v=3","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://avatars.githubusercontent.com/u/5167336?v=3","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":"2016-11-06T01:07:28Z","pushed_at":"2016-11-30T22:57:19Z","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":11448,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":76,"forks":16,"open_issues":76,"watchers":12,"default_branch":"develop"}},"base":{"label":"Minecolonies:develop","ref":"develop","sha":"27ca0ba30cc7dc6758ae4e68a9a9bcf50f418796","user":{"login":"Minecolonies","id":5167336,"avatar_url":"https://avatars.githubusercontent.com/u/5167336?v=3","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://avatars.githubusercontent.com/u/5167336?v=3","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":"2016-11-06T01:07:28Z","pushed_at":"2016-11-30T22:57:19Z","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":11448,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":76,"forks":16,"open_issues":76,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306"},"html":{"href":"https://github.com/Minecolonies/minecolonies/pull/306"},"issue":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/issues/306"},"comments":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/issues/306/comments"},"review_comments":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306/comments"},"review_comment":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/306/commits"},"statuses":{"href":"https://api.github.com/repos/Minecolonies/minecolonies/statuses/e1adfb55115f5c4b9b257c5d2b5db0d0d1282f23"}}}}
{"actor":{"display_login":"MinecoloniesSonar"}}