When moving items with storage caps in the player inventory gui on a server the items lose their data.
Using a capability and accessing the normal NBT data on the item is functional, only the cap NBT is an issue.
I haven't had a lot of time lately so I'm just posting this as a bug for now if someone else can look into it.
Is this in creative or survival?
The creative menu is a really weird clientsided system (any item you pick up is immediately erased (serverside) and then recreated when you place it down into a slot. Likewise, anything you take from the menu isn't actually created until you place it down or throw it)
I'm not 100% on it, but I bet it was creative, I tend to be in creative when testing things.
@diesieben07 added labels [Needs Update]
@p455w0rd wasn't able to comment on here for some reason, so I will for him. He says,
This is not fixed by 9df1e4b and it is not Creative mode/tab related. This affects all Items using capabilities. This includes items using the Tesla/Forge Energy systems. The caps work perfectly in SSP, and bork in SMP. The fix I'm currently implementing involves wrapping my items in RF...which is the opposite of my intended goal.
This is a really massive problem, and should probably be on the high end of the priority list for bugfixes, especially since it makes Forge's own energy pretty much useless on items.
From what I understand, this issue makes Tesla and Forge Energy, along with any other capability based power system useless on items. It's also a pretty big issue for all the other things that use capabilities for item reasons.
this needs to be reported correctly, just saying item dont work is useless.
All my tests work just fine so anyone who complains about it needs to provide some real information.
I will work with those experiencing this issue to create a test which demonstrates the issue we have been experiencing. Hopefully we can actually track down the root of the issue as well.
So, after looking in to things further, it seems that capabilities do in fact work as intended, however there are issues with the client side syncing of them. While writing a custom sync packet on the modder's end may be viable, normal item nbt is synced from the server to the client. I am still in the process of writing a test case for this issue, however I think the issue should be fairly easy for you to identify now.
see also #3099, #3283
Here's btw examples of items with capabilities on
Singleplayer vs Server
Cool now strip that down and make a simple test mod out of it.
Things _should_ loose their data they may loose it or not sync it. Which looks like the issue.
As it sits I'm not gunna touch it unless someone comes with a simple test mod I can drop into the tests folder.
This test demonstrates the issue at hand. It adds a basic hand crank battery which uses Forge's energy capability. Every right click should add 50 power to the item which you can confirm by looking at the tooltip. In single player this works as intended, however on a server it will not work. The item is in the misc creative tab.
@LexManos Not sure if you missed my reply due to all the noise of 1.11. Pinging you again for visibility of the above, as this is a serious issue for many mods.
Discussion of the specific solution to this issue is here: https://github.com/MinecraftForge/MinecraftForge/pull/3283
I have created a separate issue for discussion of Server>Client capability syncing on dedicated servers #3483, because I wasn't sure it is a solution for all issues mentioned here and also didn't want to spoil this thread with my long description of the current "non syncing" issues with itemstacks.
For many examples above the issue is really that you seem to expect that the cap nbt data gets synced to client, but it doesn't get included with the ItemStack sync packets which actually get triggered very often.
More on that in the other issue.
is there any progress on this issue? I'm not sure what the details are, but still getting reports of caps vanishing on dedi servers
@williewillus, I was hoping I would get some feedback on my implementation thoughts in either #3483 or #3283. Would you be able to review the #3283 and provide your thoughts?
This issue has been automatically marked as stale because it has not had activity in a long time, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.
Most helpful comment
This test demonstrates the issue at hand. It adds a basic hand crank battery which uses Forge's energy capability. Every right click should add 50 power to the item which you can confirm by looking at the tooltip. In single player this works as intended, however on a server it will not work. The item is in the misc creative tab.