{"action":"created","issue":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1060","repository_url":"https://api.github.com/repos/Minecolonies/minecolonies","labels_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1060/labels{/name}","comments_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1060/comments","events_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1060/events","html_url":"https://github.com/Minecolonies/minecolonies/pull/1060","id":230750177,"number":1060,"title":"1.11 Deliver correct tool level","user":{"login":"xavierh","id":2778556,"avatar_url":"https://avatars0.githubusercontent.com/u/2778556?v=3","gravatar_id":"","url":"https://api.github.com/users/xavierh","html_url":"https://github.com/xavierh","followers_url":"https://api.github.com/users/xavierh/followers","following_url":"https://api.github.com/users/xavierh/following{/other_user}","gists_url":"https://api.github.com/users/xavierh/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierh/subscriptions","organizations_url":"https://api.github.com/users/xavierh/orgs","repos_url":"https://api.github.com/users/xavierh/repos","events_url":"https://api.github.com/users/xavierh/events{/privacy}","received_events_url":"https://api.github.com/users/xavierh/received_events","type":"User","site_admin":false},"labels":[{"id":424279215,"url":"https://api.github.com/repos/Minecolonies/minecolonies/labels/in%20progress","name":"in progress","color":"fbca04","default":false},{"id":452814636,"url":"https://api.github.com/repos/Minecolonies/minecolonies/labels/not%20ready","name":"not ready","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-23T15:29:03Z","updated_at":"2017-05-31T19:52:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/pulls/1060","html_url":"https://github.com/Minecolonies/minecolonies/pull/1060","diff_url":"https://github.com/Minecolonies/minecolonies/pull/1060.diff","patch_url":"https://github.com/Minecolonies/minecolonies/pull/1060.patch"},"body":"Closes #1048 \r\nTo get tools we need to know the minimum level and the maximum level\r\n# Changes proposed in this pull request:\r\n- searching for tools in inventory require the minimum level (for example to break a specific block) and a maximum (the maximum level the worker is allowed to use)\r\n- Move ItemStack's helpers into ItemStackUtils\r\n- Guard can only use sword of appropriate level for his hut\r\n- Take enchantment into account for the maximumLevel (toolLevel + enchantment max level)\r\n- Bow, fishing rod, can be enchanted only if we have the right hut level for it (level 1 = no enchantment, level 2 = level 1 enchantment ....)\r\n\r\nWORK IN PROGRESS\r\n"},"comment":{"url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/comments/305298048","html_url":"https://github.com/Minecolonies/minecolonies/pull/1060#issuecomment-305298048","issue_url":"https://api.github.com/repos/Minecolonies/minecolonies/issues/1060","id":305298048,"user":{"login":"MinecoloniesSonar","id":19393044,"avatar_url":"https://avatars0.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},"created_at":"2017-05-31T19:52:57Z","updated_at":"2017-05-31T19:52:57Z","body":"SonarQube analysis reported 130 issues\n* ![MAJOR][MAJOR] 82 major\n* ![MINOR][MINOR] 42 minor\n* ![INFO][INFO] 6 info\n\nWatch the comments in this conversation to review them.\n\n#### Top 10 extra issues\n\nNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:\n\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L41](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L41): Split this class into smaller and more specialized ones to reduce its dependencies on other classes from 34 to the maximum authorized 30 or less. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS1200)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L41](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L41): class \"AbstractBuilding\" has 61 methods, which is greater than the 35 authorized. Split it into smaller classes. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS1448)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L109](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L109): Remove this reference to \"BuildingBaker\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L109](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L109): Remove this reference to \"BuildingBaker\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L110](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L110): Remove this reference to \"BuildingBlacksmith\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L110](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L110): Remove this reference to \"BuildingBlacksmith\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L111](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L111): Remove this reference to \"BuildingBuilder\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L112](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L112): Remove this reference to \"BuildingHome\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L112](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L112): Remove this reference to \"BuildingHome\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n1. ![MAJOR][MAJOR] [AbstractBuilding.java#L113](https://github.com/Minecolonies/minecolonies/blob/d70c0052de5b74f9206e6044c9c9279215214e08/src/main/java/com/minecolonies/coremod/colony/buildings/AbstractBuilding.java#L113): Remove this reference to \"BuildingFarmer\". [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonar.minecolonies.com/coding_rules#rule_key=squid%3AS2390)\n\n[INFO]: https://sonarsource.github.io/sonar-github/severity-info.png 'Severity: INFO'\n[MAJOR]: https://sonarsource.github.io/sonar-github/severity-major.png 'Severity: MAJOR'\n[MINOR]: https://sonarsource.github.io/sonar-github/severity-minor.png 'Severity: MINOR'"}}
{"actor":{"display_login":"MinecoloniesSonar"}}