Hoijima Posted July 19, 2017 Posted July 19, 2017 Hi. I was making an extension of player inventory doing it Capabilities style. On thing i found bizzare that every time i try to make a new ItemStack it goes 0xtile.air, and for some reason it trashes that the item stack was made not from Air but from a custom item Capa Provider - the 54 line I was trying to make it pretty and tested some probability behaviors trowing the creation of the ItemStack outside of the main class. But every time i get a itemstack 0xTile.air , but with a correct item. screenshot Does it suppose to be this way? Or i have to remake the saving of the NBT to confront this illogical behavior, and also an itemList, because i find this odd.Or maybe I'm just a dum-dum. But srsly it needs to be some thing like 1xItem.%YOURNAME or etc... Please advice, i'm a bit tired slamming this problem for the third week. Quote
Jay Avery Posted July 19, 2017 Posted July 19, 2017 (edited) Quote i get a itemstack 0xTile.air , but with a correct item. What does this mean? Where are you finding the ItemStack as 0xtile.air? Ignoring what you see in the code, what happens in the gameplay that is not what you expect? Quote Does it suppose to be this way? Or i have to remake the saving of the NBT to confront this illogical behavior NBT is nothing to do with creating items, it's only about storing data when the world is saved. Edited July 19, 2017 by Jay Avery Quote
Hoijima Posted July 19, 2017 Author Posted July 19, 2017 2 minutes ago, Jay Avery said: NBT is nothing to do with creating items, it's only about storing data when the world is saved. Yes i know ,thank you. I actually found it in the debug while trying to figure out what's happening img And , it's a bit bizzare. Because further while NBT try's to save the list of the items, it just writes minecraft:air ignoring that the itemstack item is diffirent. I tryes the default implementation and a custom with just .writeNBT from the itemstack methods, and it's the same, it writes minecraft:air all the time no matter the item. Quote
Jay Avery Posted July 19, 2017 Posted July 19, 2017 Step through this method and find out why it's getting to the else block. Quote
Hoijima Posted November 6, 2017 Author Posted November 6, 2017 Please close there actually was no problem here. Quote
Recommended Posts
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.