{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/94481862","pull_request_review_id":15007996,"id":94481862,"diff_hunk":"@@ -0,0 +1,167 @@\n+/*\n+ * This file is part of SpongeAPI, licensed under the MIT License (MIT).\n+ *\n+ * Copyright (c) SpongePowered <https://www.spongepowered.org>\n+ * Copyright (c) contributors\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+package org.spongepowered.api.item.recipe.crafting;\n+\n+import org.spongepowered.api.Sponge;\n+import org.spongepowered.api.item.inventory.ItemStack;\n+import org.spongepowered.api.item.inventory.ItemStackSnapshot;\n+import org.spongepowered.api.util.ResettableBuilder;\n+\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Optional;\n+import java.util.function.Predicate;\n+\n+import javax.annotation.Nullable;\n+\n+/**\n+ * A ShapedCraftingRecipe is a CraftingRecipe that has shape and fits into a grid.\n+ */\n+public interface ShapedCraftingRecipe extends CraftingRecipe {\n+\n+    static Builder builder() {\n+        return Sponge.getRegistry().createBuilder(Builder.class);\n+    }\n+\n+    /**\n+     * This returns an unmodifiable copy of the original aisle.\n+     *\n+     * @return An unmodifiable copy of the original aisle\n+     */\n+    List<String> getAisle();","path":"src/main/java/org/spongepowered/api/item/recipe/crafting/ShapedCraftingRecipe.java","position":53,"original_position":53,"commit_id":"08807e97a31fe538c3eab21de111c1078b89d8b1","original_commit_id":"08807e97a31fe538c3eab21de111c1078b89d8b1","user":{"login":"Deamon5550","id":1249030,"avatar_url":"https://avatars.githubusercontent.com/u/1249030?v=3","gravatar_id":"","url":"https://api.github.com/users/Deamon5550","html_url":"https://github.com/Deamon5550","followers_url":"https://api.github.com/users/Deamon5550/followers","following_url":"https://api.github.com/users/Deamon5550/following{/other_user}","gists_url":"https://api.github.com/users/Deamon5550/gists{/gist_id}","starred_url":"https://api.github.com/users/Deamon5550/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deamon5550/subscriptions","organizations_url":"https://api.github.com/users/Deamon5550/orgs","repos_url":"https://api.github.com/users/Deamon5550/repos","events_url":"https://api.github.com/users/Deamon5550/events{/privacy}","received_events_url":"https://api.github.com/users/Deamon5550/received_events","type":"User","site_admin":false},"body":"The aisle stuff is great for the builder but it doesn't have a place in the actual recipe. You already have width and height information and a method for getting the predicate for a position, keeping the aisle stuff around is useless as translating the characters is way more work than just using the methods that take an x, y position.","created_at":"2017-01-03T20:54:03Z","updated_at":"2017-01-03T21:01:02Z","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1449#discussion_r94481862","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/94481862"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/1449#discussion_r94481862"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449","id":99878115,"html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1449","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/1449.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/1449.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1449","number":1449,"state":"open","locked":false,"title":"[WIP] Generalize recipes and implement them","user":{"login":"Limeth","id":1978878,"avatar_url":"https://avatars.githubusercontent.com/u/1978878?v=3","gravatar_id":"","url":"https://api.github.com/users/Limeth","html_url":"https://github.com/Limeth","followers_url":"https://api.github.com/users/Limeth/followers","following_url":"https://api.github.com/users/Limeth/following{/other_user}","gists_url":"https://api.github.com/users/Limeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Limeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limeth/subscriptions","organizations_url":"https://api.github.com/users/Limeth/orgs","repos_url":"https://api.github.com/users/Limeth/repos","events_url":"https://api.github.com/users/Limeth/events{/privacy}","received_events_url":"https://api.github.com/users/Limeth/received_events","type":"User","site_admin":false},"body":"*SpongeAPI*|[SpongeCommon](https://github.com/SpongePowered/SpongeCommon/pull/1119)\r\n\r\nThis is a WIP continuation of [kashike's PR](https://github.com/SpongePowered/SpongeAPI/pull/1098), with his consent.\r\nIt aims to generalize how recipes are registered and handled. Instead of checking the equality of the ingredients, it works by testing ingredient predicates. It also aims to let the user implement the recipe interfaces by themselves, making it, for example, possible to transfer NBT data from the ingredients to the result.\r\nIn this PR, `ItemStackSnapshot`s are used extensively. This is to prevent the user from modifying the original `ItemStack`. I could instead provide an `ItemStack#copy`, but that doesn't make it visually obvious the original item won't change.","created_at":"2017-01-02T16:37:25Z","updated_at":"2017-01-03T21:01:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6da29dbfb4338d8e9c770c8d6ff762df7cb0e2f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1449/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/08807e97a31fe538c3eab21de111c1078b89d8b1","head":{"label":"Limeth:feature/recipe-ii","ref":"feature/recipe-ii","sha":"08807e97a31fe538c3eab21de111c1078b89d8b1","user":{"login":"Limeth","id":1978878,"avatar_url":"https://avatars.githubusercontent.com/u/1978878?v=3","gravatar_id":"","url":"https://api.github.com/users/Limeth","html_url":"https://github.com/Limeth","followers_url":"https://api.github.com/users/Limeth/followers","following_url":"https://api.github.com/users/Limeth/following{/other_user}","gists_url":"https://api.github.com/users/Limeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Limeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limeth/subscriptions","organizations_url":"https://api.github.com/users/Limeth/orgs","repos_url":"https://api.github.com/users/Limeth/repos","events_url":"https://api.github.com/users/Limeth/events{/privacy}","received_events_url":"https://api.github.com/users/Limeth/received_events","type":"User","site_admin":false},"repo":{"id":76189148,"name":"SpongeAPI","full_name":"Limeth/SpongeAPI","owner":{"login":"Limeth","id":1978878,"avatar_url":"https://avatars.githubusercontent.com/u/1978878?v=3","gravatar_id":"","url":"https://api.github.com/users/Limeth","html_url":"https://github.com/Limeth","followers_url":"https://api.github.com/users/Limeth/followers","following_url":"https://api.github.com/users/Limeth/following{/other_user}","gists_url":"https://api.github.com/users/Limeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Limeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Limeth/subscriptions","organizations_url":"https://api.github.com/users/Limeth/orgs","repos_url":"https://api.github.com/users/Limeth/repos","events_url":"https://api.github.com/users/Limeth/events{/privacy}","received_events_url":"https://api.github.com/users/Limeth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Limeth/SpongeAPI","description":"A Minecraft plugin API","fork":true,"url":"https://api.github.com/repos/Limeth/SpongeAPI","forks_url":"https://api.github.com/repos/Limeth/SpongeAPI/forks","keys_url":"https://api.github.com/repos/Limeth/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Limeth/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Limeth/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/Limeth/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/Limeth/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/Limeth/SpongeAPI/events","assignees_url":"https://api.github.com/repos/Limeth/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/Limeth/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/Limeth/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/Limeth/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Limeth/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Limeth/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/Limeth/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Limeth/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/Limeth/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/Limeth/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/Limeth/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/Limeth/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/Limeth/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/Limeth/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/Limeth/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/Limeth/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/Limeth/SpongeAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/Limeth/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/Limeth/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Limeth/SpongeAPI/merges","archive_url":"https://api.github.com/repos/Limeth/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Limeth/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/Limeth/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/Limeth/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/Limeth/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/Limeth/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Limeth/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/Limeth/SpongeAPI/releases{/id}","deployments_url":"https://api.github.com/repos/Limeth/SpongeAPI/deployments","created_at":"2016-12-11T17:31:24Z","updated_at":"2016-12-11T17:31:32Z","pushed_at":"2017-01-03T18:38:06Z","git_url":"git://github.com/Limeth/SpongeAPI.git","ssh_url":"git@github.com:Limeth/SpongeAPI.git","clone_url":"https://github.com/Limeth/SpongeAPI.git","svn_url":"https://github.com/Limeth/SpongeAPI","homepage":"http://www.spongepowered.org/","size":9740,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleeding"}},"base":{"label":"SpongePowered:bleeding","ref":"bleeding","sha":"402597804d55404e59dbdaabda8516a0656eb6e6","user":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"repo":{"id":23770421,"name":"SpongeAPI","full_name":"SpongePowered/SpongeAPI","owner":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpongePowered/SpongeAPI","description":"A Minecraft plugin API","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeAPI","forks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/releases{/id}","deployments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/deployments","created_at":"2014-09-07T20:39:25Z","updated_at":"2017-01-03T13:16:01Z","pushed_at":"2017-01-03T18:38:08Z","git_url":"git://github.com/SpongePowered/SpongeAPI.git","ssh_url":"git@github.com:SpongePowered/SpongeAPI.git","clone_url":"https://github.com/SpongePowered/SpongeAPI.git","svn_url":"https://github.com/SpongePowered/SpongeAPI","homepage":"http://www.spongepowered.org/","size":9723,"stargazers_count":844,"watchers_count":844,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":351,"mirror_url":null,"open_issues_count":183,"forks":351,"open_issues":183,"watchers":844,"default_branch":"bleeding"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/1449"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1449"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1449/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1449/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/08807e97a31fe538c3eab21de111c1078b89d8b1"}}}}
{"actor":{"display_login":"Deamon5550"}}