{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/Mixin/issues/69","repository_url":"https://api.github.com/repos/SpongePowered/Mixin","labels_url":"https://api.github.com/repos/SpongePowered/Mixin/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/Mixin/issues/69/comments","events_url":"https://api.github.com/repos/SpongePowered/Mixin/issues/69/events","html_url":"https://github.com/SpongePowered/Mixin/issues/69","id":108017091,"number":69,"title":"Shower Thoughts - Make the Goose (now the Duck) always quack like the Duck","user":{"login":"Zidane","id":744482,"avatar_url":"https://avatars.githubusercontent.com/u/744482?v=3","gravatar_id":"","url":"https://api.github.com/users/Zidane","html_url":"https://github.com/Zidane","followers_url":"https://api.github.com/users/Zidane/followers","following_url":"https://api.github.com/users/Zidane/following{/other_user}","gists_url":"https://api.github.com/users/Zidane/gists{/gist_id}","starred_url":"https://api.github.com/users/Zidane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zidane/subscriptions","organizations_url":"https://api.github.com/users/Zidane/orgs","repos_url":"https://api.github.com/users/Zidane/repos","events_url":"https://api.github.com/users/Zidane/events{/privacy}","received_events_url":"https://api.github.com/users/Zidane/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-09-23T22:05:50Z","updated_at":"2016-06-13T15:10:26Z","closed_at":"2015-09-24T10:35:35Z","body":"Awesome title huh?\r\n\r\nSo I had the thought yesterday while, you guessed it, in the shower to create a new type of mixin that would cover the following situation:\r\n\r\nFor Inventory, Minecraft has an IInventory interface. Lets take these two scenarios:\r\n\r\n``` class InventoryBasic implements IInventory {} ```\r\n\r\n``` class InventoryBackpack implements IInventory {} ```\r\n\r\nWhile it would be nice if mods used InventoryBasic, most just implement IInventory. Not a problem as step one in becoming a fake Duck is:\r\n\r\n```\r\n@Mixin(IInventory.class)\r\nabstract class MixinIInventory implements api.Inventory\r\n```\r\n\r\nNow I'm not silly enough to think that it'll magically implement the interface. I'm banking on it NOT doing so, I just want to add our api interface to the hierarchy. If possible (or can be made possible), I would like for my new Duck to always quack like a Duck amongst other Ducks.\r\n\r\nRiddles aside, I'd like a Mixin where I can say \"Take the following methods and mix them into anything that implements the target\". Basically my thought is I could magically make mod inventories actually have OUR methods by injecting the code into it that wouldn't change. Lets change our Mixin...\r\n\r\n```\r\n@Mixin(IInventory.class, children=true)\r\nabstract class MixinIInventoryChildren implements api.inventory {\r\n// Perform intrinsic magic here so api and minecraft interfaces don't conflict\r\n// Implement api interface methods, such as the ones for querying, by using what we have...the minecraft interface\r\n}\r\n```\r\n\r\nThat is as rough as it gets both hopefully someone out there understands what I'm going for."},"comment":{"url":"https://api.github.com/repos/SpongePowered/Mixin/issues/comments/225610644","html_url":"https://github.com/SpongePowered/Mixin/issues/69#issuecomment-225610644","issue_url":"https://api.github.com/repos/SpongePowered/Mixin/issues/69","id":225610644,"user":{"login":"olee","id":6547794,"avatar_url":"https://avatars.githubusercontent.com/u/6547794?v=3","gravatar_id":"","url":"https://api.github.com/users/olee","html_url":"https://github.com/olee","followers_url":"https://api.github.com/users/olee/followers","following_url":"https://api.github.com/users/olee/following{/other_user}","gists_url":"https://api.github.com/users/olee/gists{/gist_id}","starred_url":"https://api.github.com/users/olee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olee/subscriptions","organizations_url":"https://api.github.com/users/olee/orgs","repos_url":"https://api.github.com/users/olee/repos","events_url":"https://api.github.com/users/olee/events{/privacy}","received_events_url":"https://api.github.com/users/olee/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T15:10:26Z","updated_at":"2016-06-13T15:10:26Z","body":"That would be great!\r\nCurrently it works with that lightweight injector I wrote quite nice, but it's missing all that security stuff etc. that is part of the Mixin environment so that would be nice."}}
{"actor":{"display_login":"olee"}}