{"action":"opened","number":359,"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359","id":54507019,"html_url":"https://github.com/SpongePowered/SpongeCommon/pull/359","diff_url":"https://github.com/SpongePowered/SpongeCommon/pull/359.diff","patch_url":"https://github.com/SpongePowered/SpongeCommon/pull/359.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/359","number":359,"state":"open","locked":false,"title":"Implementing DyeableData","user":{"login":"Rain336","id":1616683,"avatar_url":"https://avatars.githubusercontent.com/u/1616683?v=3","gravatar_id":"","url":"https://api.github.com/users/Rain336","html_url":"https://github.com/Rain336","followers_url":"https://api.github.com/users/Rain336/followers","following_url":"https://api.github.com/users/Rain336/following{/other_user}","gists_url":"https://api.github.com/users/Rain336/gists{/gist_id}","starred_url":"https://api.github.com/users/Rain336/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rain336/subscriptions","organizations_url":"https://api.github.com/users/Rain336/orgs","repos_url":"https://api.github.com/users/Rain336/repos","events_url":"https://api.github.com/users/Rain336/events{/privacy}","received_events_url":"https://api.github.com/users/Rain336/received_events","type":"User","site_admin":false},"body":"Implementation of `SpongeDyeableData`.\r\n- [x] Registration of field getters and setters\r\n- [x] Accurately used the appropriate `AbstractData` implementation\r\n\r\nImplementation of `ImmutableSpongeDyeableData`\r\n- [x] Accurately extended the appropriate `AbstractImmutableData` implementation\r\n- [x] Accurately instantiating final instance fields with an `ImmutableValue` counter part for any value getters\r\n- [x] If necessary, creating a new `ImmutableValue` for a value that should not be cached, or, using the existing caching utils.\r\n\r\nImplementation of the `DyeColorValueProcessor`s:\r\n- [x] Appropriately extended `AbstractSpongeValueProcessor`\r\n- [x] Individual processors for each source type possible (one for `ItemStack`/`TileEntity`/`Entity` as necessary).\r\n\r\nRegistration:\r\n- [x] Registered the `Key` correctly by `DYE_COLOR` in the `KeyRegistry`\r\n- [x] Registered the `DataProcessor`s and `DataManipulatorBuilder` in `DataRegistrar`\r\n- [x] Registered the `ValueProcessor`s in the `DataRegistrar`\r\n\r\nTest Plugin code:\r\n```java\r\n@Plugin(id = \"CodeTester\", name = \"CodeTester\", version = \"1.0.0\")\r\npublic class CodeTester {\r\n\r\n    @Listener\r\n    public void preInit(GamePreInitializationEvent event) {\r\n        CommandSpec getColor = CommandSpec.builder()\r\n                .arguments(GenericArguments.catalogedElement(Texts.of(\"Color\"), DyeColor.class), GenericArguments.string(Texts.of(\"Type\")))\r\n                .executor((src, args) -> {\r\n                    DyeColor color = args.<DyeColor>getOne(\"Color\").get();\r\n                    String typeString = args.<String>getOne(\"Type\").get();\r\n                    CatalogType type;\r\n                    if (src instanceof Player) {\r\n                        Player player = (Player) src;\r\n                        switch (typeString.toLowerCase()) {\r\n                            case \"glass_pane\":\r\n                                type = ItemTypes.STAINED_GLASS_PANE;\r\n                                break;\r\n                            case \"glass\":\r\n                                type = ItemTypes.STAINED_GLASS;\r\n                                break;\r\n                            case \"wool\":\r\n                                type = ItemTypes.WOOL;\r\n                                break;\r\n                            case \"dye\":\r\n                                type = ItemTypes.DYE;\r\n                                break;\r\n                            case \"sheep\":\r\n                                type = EntityTypes.SHEEP;\r\n                                break;\r\n                            case \"wolf\":\r\n                                type = EntityTypes.WOLF;\r\n                                break;\r\n                            default:\r\n                            case \"clay\":\r\n                                type = ItemTypes.STAINED_HARDENED_CLAY;\r\n                                break;\r\n                        }\r\n                        if (type instanceof ItemType) {\r\n                            ItemStack item = ItemStack.of((ItemType) type, 1);\r\n                            if (item.supports(Keys.DYE_COLOR)) {\r\n                                item.offer(Keys.DYE_COLOR, color);\r\n                            }\r\n                            player.setItemInHand(item);\r\n                            return CommandResult.success();\r\n                        } else if (type instanceof EntityType) {\r\n                            Vector3d position = player.getLocation().getPosition().add(2, 0, 2);\r\n                            Optional<Entity> optional = player.getLocation().getExtent().createEntity((EntityType) type, position);\r\n                            if (optional.isPresent()) {\r\n                                Entity entity = optional.get();\r\n                                if (entity.supports(Keys.DYE_COLOR)) {\r\n                                    entity.offer(Keys.DYE_COLOR, color);\r\n                                }\r\n                                player.getLocation().getExtent().spawnEntity(entity, Cause.of(this));\r\n                                return CommandResult.success();\r\n                            }\r\n                        }\r\n                    }\r\n                    return CommandResult.empty();\r\n                }).build();\r\n        Sponge.getCommandDispatcher().register(this, getColor, \"getColor\");\r\n    }\r\n}\r\n```","created_at":"2015-12-23T21:10:29Z","updated_at":"2015-12-23T21:10:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/359/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/202aee74b2dab4e004719d866674fbe60c78e30c","head":{"label":"Rain336:feature/DyeableData","ref":"feature/DyeableData","sha":"202aee74b2dab4e004719d866674fbe60c78e30c","user":{"login":"Rain336","id":1616683,"avatar_url":"https://avatars.githubusercontent.com/u/1616683?v=3","gravatar_id":"","url":"https://api.github.com/users/Rain336","html_url":"https://github.com/Rain336","followers_url":"https://api.github.com/users/Rain336/followers","following_url":"https://api.github.com/users/Rain336/following{/other_user}","gists_url":"https://api.github.com/users/Rain336/gists{/gist_id}","starred_url":"https://api.github.com/users/Rain336/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rain336/subscriptions","organizations_url":"https://api.github.com/users/Rain336/orgs","repos_url":"https://api.github.com/users/Rain336/repos","events_url":"https://api.github.com/users/Rain336/events{/privacy}","received_events_url":"https://api.github.com/users/Rain336/received_events","type":"User","site_admin":false},"repo":{"id":43758038,"name":"SpongeCommon","full_name":"Rain336/SpongeCommon","owner":{"login":"Rain336","id":1616683,"avatar_url":"https://avatars.githubusercontent.com/u/1616683?v=3","gravatar_id":"","url":"https://api.github.com/users/Rain336","html_url":"https://github.com/Rain336","followers_url":"https://api.github.com/users/Rain336/followers","following_url":"https://api.github.com/users/Rain336/following{/other_user}","gists_url":"https://api.github.com/users/Rain336/gists{/gist_id}","starred_url":"https://api.github.com/users/Rain336/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rain336/subscriptions","organizations_url":"https://api.github.com/users/Rain336/orgs","repos_url":"https://api.github.com/users/Rain336/repos","events_url":"https://api.github.com/users/Rain336/events{/privacy}","received_events_url":"https://api.github.com/users/Rain336/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rain336/SpongeCommon","description":"Shared code between Sponge and SpongeVanilla","fork":true,"url":"https://api.github.com/repos/Rain336/SpongeCommon","forks_url":"https://api.github.com/repos/Rain336/SpongeCommon/forks","keys_url":"https://api.github.com/repos/Rain336/SpongeCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rain336/SpongeCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rain336/SpongeCommon/teams","hooks_url":"https://api.github.com/repos/Rain336/SpongeCommon/hooks","issue_events_url":"https://api.github.com/repos/Rain336/SpongeCommon/issues/events{/number}","events_url":"https://api.github.com/repos/Rain336/SpongeCommon/events","assignees_url":"https://api.github.com/repos/Rain336/SpongeCommon/assignees{/user}","branches_url":"https://api.github.com/repos/Rain336/SpongeCommon/branches{/branch}","tags_url":"https://api.github.com/repos/Rain336/SpongeCommon/tags","blobs_url":"https://api.github.com/repos/Rain336/SpongeCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rain336/SpongeCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rain336/SpongeCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rain336/SpongeCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rain336/SpongeCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/Rain336/SpongeCommon/languages","stargazers_url":"https://api.github.com/repos/Rain336/SpongeCommon/stargazers","contributors_url":"https://api.github.com/repos/Rain336/SpongeCommon/contributors","subscribers_url":"https://api.github.com/repos/Rain336/SpongeCommon/subscribers","subscription_url":"https://api.github.com/repos/Rain336/SpongeCommon/subscription","commits_url":"https://api.github.com/repos/Rain336/SpongeCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rain336/SpongeCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rain336/SpongeCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rain336/SpongeCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rain336/SpongeCommon/contents/{+path}","compare_url":"https://api.github.com/repos/Rain336/SpongeCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rain336/SpongeCommon/merges","archive_url":"https://api.github.com/repos/Rain336/SpongeCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rain336/SpongeCommon/downloads","issues_url":"https://api.github.com/repos/Rain336/SpongeCommon/issues{/number}","pulls_url":"https://api.github.com/repos/Rain336/SpongeCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/Rain336/SpongeCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/Rain336/SpongeCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rain336/SpongeCommon/labels{/name}","releases_url":"https://api.github.com/repos/Rain336/SpongeCommon/releases{/id}","created_at":"2015-10-06T15:01:38Z","updated_at":"2015-10-06T15:01:41Z","pushed_at":"2015-12-23T21:04:04Z","git_url":"git://github.com/Rain336/SpongeCommon.git","ssh_url":"git@github.com:Rain336/SpongeCommon.git","clone_url":"https://github.com/Rain336/SpongeCommon.git","svn_url":"https://github.com/Rain336/SpongeCommon","homepage":null,"size":7025,"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":"SpongePowered:master","ref":"master","sha":"cfefd7738e45aefdeb132cb81b700f4066bac606","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":33791453,"name":"SpongeCommon","full_name":"SpongePowered/SpongeCommon","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/SpongeCommon","description":"Shared code between SpongeForge and SpongeVanilla","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeCommon","forks_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/releases{/id}","created_at":"2015-04-11T20:38:48Z","updated_at":"2015-12-22T21:17:04Z","pushed_at":"2015-12-23T21:10:29Z","git_url":"git://github.com/SpongePowered/SpongeCommon.git","ssh_url":"git@github.com:SpongePowered/SpongeCommon.git","clone_url":"https://github.com/SpongePowered/SpongeCommon.git","svn_url":"https://github.com/SpongePowered/SpongeCommon","homepage":"","size":11843,"stargazers_count":62,"watchers_count":62,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":65,"forks":62,"open_issues":65,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359"},"html":{"href":"https://github.com/SpongePowered/SpongeCommon/pull/359"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/359"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/359/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/359/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/202aee74b2dab4e004719d866674fbe60c78e30c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":358,"deletions":0,"changed_files":5}}