HalestormXV Posted October 22, 2015 Share Posted October 22, 2015 Hello there. So I just pushed my mod into a release candidate and it works awesome on Single Player. I have quite literally 0 issues. And that is thanks to the wide variety of help I have gotten from this community especially. I have a simple question. Some of my items utilize NBT data in which I followed the documentation from various sources as well as retrieved help from the various community members here. I put my mod into a network environment (SMP) and I fear something may be wrong. I haven't had the chance to test it quite yet however it occurred to me that two items specifically utilize NBT data in their code however they do not have a writeToNBT function or readFromNBT aside from the TagCompound functions within their classes. Now although they store NBT data (for example one items stores how many times you have used it and the other stores a cooldown of the item and both store the names of the user) do those functions automatically get written to the server data and read from the server data simply by calling the stackTagCompound.setInteger or the stackTagCompound.getInteger? Or do you need to create different functions to have the data written to the server and read from the server? Here are my two classes that utilize NBT. Both of these are items however neither of them have a write toNBT or loadfromNBT function like my TileEntity class for my furnace which works fine on SMP http://pastebin.com/3wn7qECD http://pastebin.com/fA75J4Yy If anyone can take a quick browse through that and let me know if it should work fine on SMP i appreciate it. Or do I need these writeNBT and loadNBT functions. Like I said I haven't gotten to test it yet but do plan to. But I know it does work just fine on my singleplayer world as I have tested it there. Quote Link to comment Share on other sites More sharing options...
coolAlias Posted October 22, 2015 Share Posted October 22, 2015 ItemStack nbt data is automatically read and written - you don't need to do anything other than set it. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
HalestormXV Posted October 22, 2015 Author Share Posted October 22, 2015 Alright that's good to know. That is what I though but just wanted to be sure. Quote Link to comment Share on other sites More sharing options...
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.