Posted August 2, 201510 yr I'm working on a n item with 16 colour metadatas based on the 16 block colours. For some reason, however, if I have, for example, a green one in my inventory and pick up a purple one, the purple one will get picked up as a green one. So instead of a purple item being added to my inventory, the itemstack that contains the green item will increase in stack size by 1. This also occurs when using /give, however I believe that the give command uses item pick up code, so that doesn't shock me. My Item Code: http://pastebin.com/S1Q54GpG If you need to see any other code, let me know. Do I have to use some sort of workaround? Am I doing something wrong? Has this happened to anyone else? http://i.imgur.com/wEmXZn7.png[/img]
August 2, 201510 yr You need to call setHasSubtypes(true) on your Item , otherwise the metadata will be ignored when the player picks it up. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 2, 201510 yr Author You need to call setHasSubtypes(true) on your Item , otherwise the metadata will be ignored when the player picks it up. Haha, I can't believe I missed that! Thankyou! Solved. http://i.imgur.com/wEmXZn7.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.