{"action":"created","comment":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/comments/44905955","id":44905955,"diff_hunk":"@@ -17,23 +17,189 @@\n          {\n              if (!this.field_70170_p.field_72995_K && (this.field_70963_i == null || this.field_70963_i.size() > 0))\n              {\n-@@ -540,6 +541,7 @@\n+@@ -255,6 +256,8 @@\n+     {\n+         super.func_70014_b(p_70014_1_);\n+         p_70014_1_.func_74768_a(\"Profession\", this.func_70946_n());\n++        String professionName = net.minecraftforge.fml.common.registry.VillagerRegistry.getProfessionForId(this.func_70946_n()).getName();\n++        p_70014_1_.func_74778_a(\"professionName\", professionName);\n+         p_70014_1_.func_74768_a(\"Riches\", this.field_70956_bz);\n+         p_70014_1_.func_74768_a(\"Career\", this.field_175563_bv);\n+         p_70014_1_.func_74768_a(\"CareerLevel\", this.field_175562_bw);\n+@@ -283,14 +286,34 @@\n+     public void func_70037_a(NBTTagCompound p_70037_1_)\n+     {\n+         super.func_70037_a(p_70037_1_);\n+-        this.func_70938_b(p_70037_1_.func_74762_e(\"Profession\"));\n++        int professionId = p_70037_1_.func_74762_e(\"Profession\");\n++        String professionName = p_70037_1_.func_74779_i(\"professionName\");\n++        net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession profession = net.minecraftforge.fml.common.registry.VillagerRegistry.getProfessionForName(professionName);\n++        String oldProfession = profession.getName();\n++        if(oldProfession.equals(professionName) && professionId != profession.getId())\n++        {\n++            professionId = profession.getId();\n++        }\n++        else if(!professionName.isEmpty() && !oldProfession.equals(professionName))\n++        {\n++            professionId = 0;\n++        }\n++        this.func_70938_b(professionId);\n+         this.field_70956_bz = p_70037_1_.func_74762_e(\"Riches\");\n+         this.field_175563_bv = p_70037_1_.func_74762_e(\"Career\");\n+         this.field_175562_bw = p_70037_1_.func_74762_e(\"CareerLevel\");\n+         this.field_175565_bs = p_70037_1_.func_74767_n(\"Willing\");\n+-\n+-        if (p_70037_1_.func_150297_b(\"Offers\", 10))\n++        \n++        String newProfessionName = net.minecraftforge.fml.common.registry.VillagerRegistry.getProfessionForId(func_70946_n()).getName();\n++        if(professionId != func_70946_n()||!(professionName.equals(newProfessionName)||professionName.isEmpty()))","path":"patches/minecraft/net/minecraft/entity/passive/EntityVillager.java.patch","position":40,"original_position":40,"commit_id":"f9a1ac6637eee1dda32cb5e2b6c939294b7d8ecb","original_commit_id":"f9a1ac6637eee1dda32cb5e2b6c939294b7d8ecb","user":{"login":"LexManos","id":702211,"avatar_url":"https://avatars.githubusercontent.com/u/702211?v=3","gravatar_id":"","url":"https://api.github.com/users/LexManos","html_url":"https://github.com/LexManos","followers_url":"https://api.github.com/users/LexManos/followers","following_url":"https://api.github.com/users/LexManos/following{/other_user}","gists_url":"https://api.github.com/users/LexManos/gists{/gist_id}","starred_url":"https://api.github.com/users/LexManos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LexManos/subscriptions","organizations_url":"https://api.github.com/users/LexManos/orgs","repos_url":"https://api.github.com/users/LexManos/repos","events_url":"https://api.github.com/users/LexManos/events{/privacy}","received_events_url":"https://api.github.com/users/LexManos/received_events","type":"User","site_admin":false},"body":"check your spacing.","created_at":"2015-11-16T10:09:18Z","updated_at":"2015-11-16T10:09:18Z","html_url":"https://github.com/MinecraftForge/MinecraftForge/pull/2193#discussion_r44905955","pull_request_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193","_links":{"self":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/comments/44905955"},"html":{"href":"https://github.com/MinecraftForge/MinecraftForge/pull/2193#discussion_r44905955"},"pull_request":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193"}}},"pull_request":{"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193","id":50768025,"html_url":"https://github.com/MinecraftForge/MinecraftForge/pull/2193","diff_url":"https://github.com/MinecraftForge/MinecraftForge/pull/2193.diff","patch_url":"https://github.com/MinecraftForge/MinecraftForge/pull/2193.patch","issue_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/2193","number":2193,"state":"open","locked":false,"title":"Villager Registry Changes","user":{"login":"Thutmose","id":2363472,"avatar_url":"https://avatars.githubusercontent.com/u/2363472?v=3","gravatar_id":"","url":"https://api.github.com/users/Thutmose","html_url":"https://github.com/Thutmose","followers_url":"https://api.github.com/users/Thutmose/followers","following_url":"https://api.github.com/users/Thutmose/following{/other_user}","gists_url":"https://api.github.com/users/Thutmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Thutmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thutmose/subscriptions","organizations_url":"https://api.github.com/users/Thutmose/orgs","repos_url":"https://api.github.com/users/Thutmose/repos","events_url":"https://api.github.com/users/Thutmose/events{/privacy}","received_events_url":"https://api.github.com/users/Thutmose/received_events","type":"User","site_admin":false},"body":"If a profession is removed, any villager with that profession has levels\r\nand trades reset, and is reset to farmer.\r\nIf a profession's id is changed, it automatically re-assigns it\r\naccordingly, so professions can be added or removed as needed, with\r\ntrades only changing if the villager's profession is removed.\r\n\r\nSetting a villager's profession will reset the career (i.e. randomize it) as well as resetting the trade list.  This does not affect reading from NBT, as profession is set before the other values are read.\r\n\r\nVanilla spawning works as it used to, with any building/spawnegg that\r\nused to make random villagers being able to have the new ones as\r\nwell, but any building with specific villagers, still only makes that\r\nspecific villager, this is ensured so long as the new villagers are\r\nregistered after the vanilla ones.\r\n\r\nThe test mod adds three new professions, and it was tested by randomly\r\ncommenting some of them out, then running minecraft, then commenting\r\nsome of them back in.  The villagers which were not removed properly\r\nkept their professions, and the ones that were removed were set to\r\nfarmers.  with the test mod, change the int toSet in the interact event handler to whichever villager profession you want it to set, then shift right click the villager with a stick, it will change the profession.","created_at":"2015-11-16T03:31:53Z","updated_at":"2015-11-16T10:09:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f498668c657e23ee0b3eb4323327227b0049b40f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193/commits","review_comments_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193/comments","review_comment_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/2193/comments","statuses_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/statuses/f9a1ac6637eee1dda32cb5e2b6c939294b7d8ecb","head":{"label":"Thutmose:master","ref":"master","sha":"f9a1ac6637eee1dda32cb5e2b6c939294b7d8ecb","user":{"login":"Thutmose","id":2363472,"avatar_url":"https://avatars.githubusercontent.com/u/2363472?v=3","gravatar_id":"","url":"https://api.github.com/users/Thutmose","html_url":"https://github.com/Thutmose","followers_url":"https://api.github.com/users/Thutmose/followers","following_url":"https://api.github.com/users/Thutmose/following{/other_user}","gists_url":"https://api.github.com/users/Thutmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Thutmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thutmose/subscriptions","organizations_url":"https://api.github.com/users/Thutmose/orgs","repos_url":"https://api.github.com/users/Thutmose/repos","events_url":"https://api.github.com/users/Thutmose/events{/privacy}","received_events_url":"https://api.github.com/users/Thutmose/received_events","type":"User","site_admin":false},"repo":{"id":46198927,"name":"MinecraftForge","full_name":"Thutmose/MinecraftForge","owner":{"login":"Thutmose","id":2363472,"avatar_url":"https://avatars.githubusercontent.com/u/2363472?v=3","gravatar_id":"","url":"https://api.github.com/users/Thutmose","html_url":"https://github.com/Thutmose","followers_url":"https://api.github.com/users/Thutmose/followers","following_url":"https://api.github.com/users/Thutmose/following{/other_user}","gists_url":"https://api.github.com/users/Thutmose/gists{/gist_id}","starred_url":"https://api.github.com/users/Thutmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thutmose/subscriptions","organizations_url":"https://api.github.com/users/Thutmose/orgs","repos_url":"https://api.github.com/users/Thutmose/repos","events_url":"https://api.github.com/users/Thutmose/events{/privacy}","received_events_url":"https://api.github.com/users/Thutmose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thutmose/MinecraftForge","description":"Modifications to the Minecraft base files to assist in compatibility between mods.","fork":true,"url":"https://api.github.com/repos/Thutmose/MinecraftForge","forks_url":"https://api.github.com/repos/Thutmose/MinecraftForge/forks","keys_url":"https://api.github.com/repos/Thutmose/MinecraftForge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thutmose/MinecraftForge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thutmose/MinecraftForge/teams","hooks_url":"https://api.github.com/repos/Thutmose/MinecraftForge/hooks","issue_events_url":"https://api.github.com/repos/Thutmose/MinecraftForge/issues/events{/number}","events_url":"https://api.github.com/repos/Thutmose/MinecraftForge/events","assignees_url":"https://api.github.com/repos/Thutmose/MinecraftForge/assignees{/user}","branches_url":"https://api.github.com/repos/Thutmose/MinecraftForge/branches{/branch}","tags_url":"https://api.github.com/repos/Thutmose/MinecraftForge/tags","blobs_url":"https://api.github.com/repos/Thutmose/MinecraftForge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thutmose/MinecraftForge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thutmose/MinecraftForge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thutmose/MinecraftForge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thutmose/MinecraftForge/statuses/{sha}","languages_url":"https://api.github.com/repos/Thutmose/MinecraftForge/languages","stargazers_url":"https://api.github.com/repos/Thutmose/MinecraftForge/stargazers","contributors_url":"https://api.github.com/repos/Thutmose/MinecraftForge/contributors","subscribers_url":"https://api.github.com/repos/Thutmose/MinecraftForge/subscribers","subscription_url":"https://api.github.com/repos/Thutmose/MinecraftForge/subscription","commits_url":"https://api.github.com/repos/Thutmose/MinecraftForge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thutmose/MinecraftForge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thutmose/MinecraftForge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thutmose/MinecraftForge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Thutmose/MinecraftForge/contents/{+path}","compare_url":"https://api.github.com/repos/Thutmose/MinecraftForge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thutmose/MinecraftForge/merges","archive_url":"https://api.github.com/repos/Thutmose/MinecraftForge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thutmose/MinecraftForge/downloads","issues_url":"https://api.github.com/repos/Thutmose/MinecraftForge/issues{/number}","pulls_url":"https://api.github.com/repos/Thutmose/MinecraftForge/pulls{/number}","milestones_url":"https://api.github.com/repos/Thutmose/MinecraftForge/milestones{/number}","notifications_url":"https://api.github.com/repos/Thutmose/MinecraftForge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thutmose/MinecraftForge/labels{/name}","releases_url":"https://api.github.com/repos/Thutmose/MinecraftForge/releases{/id}","created_at":"2015-11-15T01:08:32Z","updated_at":"2015-11-15T01:08:39Z","pushed_at":"2015-11-16T03:25:42Z","git_url":"git://github.com/Thutmose/MinecraftForge.git","ssh_url":"git@github.com:Thutmose/MinecraftForge.git","clone_url":"https://github.com/Thutmose/MinecraftForge.git","svn_url":"https://github.com/Thutmose/MinecraftForge","homepage":"","size":150468,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"MinecraftForge:master","ref":"master","sha":"41e971ecc99f14e1a97cc3c04a26abcfcb58a6fc","user":{"login":"MinecraftForge","id":1390178,"avatar_url":"https://avatars.githubusercontent.com/u/1390178?v=3","gravatar_id":"","url":"https://api.github.com/users/MinecraftForge","html_url":"https://github.com/MinecraftForge","followers_url":"https://api.github.com/users/MinecraftForge/followers","following_url":"https://api.github.com/users/MinecraftForge/following{/other_user}","gists_url":"https://api.github.com/users/MinecraftForge/gists{/gist_id}","starred_url":"https://api.github.com/users/MinecraftForge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinecraftForge/subscriptions","organizations_url":"https://api.github.com/users/MinecraftForge/orgs","repos_url":"https://api.github.com/users/MinecraftForge/repos","events_url":"https://api.github.com/users/MinecraftForge/events{/privacy}","received_events_url":"https://api.github.com/users/MinecraftForge/received_events","type":"Organization","site_admin":false},"repo":{"id":3301400,"name":"MinecraftForge","full_name":"MinecraftForge/MinecraftForge","owner":{"login":"MinecraftForge","id":1390178,"avatar_url":"https://avatars.githubusercontent.com/u/1390178?v=3","gravatar_id":"","url":"https://api.github.com/users/MinecraftForge","html_url":"https://github.com/MinecraftForge","followers_url":"https://api.github.com/users/MinecraftForge/followers","following_url":"https://api.github.com/users/MinecraftForge/following{/other_user}","gists_url":"https://api.github.com/users/MinecraftForge/gists{/gist_id}","starred_url":"https://api.github.com/users/MinecraftForge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinecraftForge/subscriptions","organizations_url":"https://api.github.com/users/MinecraftForge/orgs","repos_url":"https://api.github.com/users/MinecraftForge/repos","events_url":"https://api.github.com/users/MinecraftForge/events{/privacy}","received_events_url":"https://api.github.com/users/MinecraftForge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MinecraftForge/MinecraftForge","description":"Modifications to the Minecraft base files to assist in compatibility between mods.","fork":false,"url":"https://api.github.com/repos/MinecraftForge/MinecraftForge","forks_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/forks","keys_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/teams","hooks_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/hooks","issue_events_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/events{/number}","events_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/events","assignees_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/assignees{/user}","branches_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/branches{/branch}","tags_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/tags","blobs_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/git/refs{/sha}","trees_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/statuses/{sha}","languages_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/languages","stargazers_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/stargazers","contributors_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/contributors","subscribers_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/subscribers","subscription_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/subscription","commits_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/commits{/sha}","git_commits_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/git/commits{/sha}","comments_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/comments{/number}","issue_comment_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/comments{/number}","contents_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/contents/{+path}","compare_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/merges","archive_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/downloads","issues_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues{/number}","pulls_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls{/number}","milestones_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/milestones{/number}","notifications_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/labels{/name}","releases_url":"https://api.github.com/repos/MinecraftForge/MinecraftForge/releases{/id}","created_at":"2012-01-30T01:35:01Z","updated_at":"2015-11-15T19:15:00Z","pushed_at":"2015-11-16T03:52:15Z","git_url":"git://github.com/MinecraftForge/MinecraftForge.git","ssh_url":"git@github.com:MinecraftForge/MinecraftForge.git","clone_url":"https://github.com/MinecraftForge/MinecraftForge.git","svn_url":"https://github.com/MinecraftForge/MinecraftForge","homepage":"","size":150468,"stargazers_count":1102,"watchers_count":1102,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":639,"mirror_url":null,"open_issues_count":226,"forks":639,"open_issues":226,"watchers":1102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193"},"html":{"href":"https://github.com/MinecraftForge/MinecraftForge/pull/2193"},"issue":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/2193"},"comments":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/issues/2193/comments"},"review_comments":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193/comments"},"review_comment":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/pulls/2193/commits"},"statuses":{"href":"https://api.github.com/repos/MinecraftForge/MinecraftForge/statuses/f9a1ac6637eee1dda32cb5e2b6c939294b7d8ecb"}}}}