BluSunrize / ImmersiveEngineering

Wires, transformers, high voltage! Bzzzzt!
Other
786 stars 390 forks source link

1.12.2 Engineer's toolbox content loss #2737

Open ghost opened 6 years ago

ghost commented 6 years ago

Mod pack being used it Feed the beast revelation. Entering creative mod with a an engineer's toolbox in the first slot of my hotbar and then returning to survival mode removed all items from my toolbox.

malte0811 commented 6 years ago

Is this on a server?

ghost commented 6 years ago

Yes it is.

malte0811 commented 6 years ago

This isn't really our fault, see MinecraftForge/MinecraftForge#4580 and the linked issues/PR's. It would be fixable, but a) that would be a mess and b) there will probably be a fix in forge soon-ish.

ghost commented 6 years ago

unfortunate, but good to know! thanks I just try to remember to stick my toolbox in a chest before I have to go creative for whatever reason.

malte0811 commented 6 years ago

Same for everything with upgrades, or storing any other items in an item. Anything storing fluid is probably affected as well, I never tried that though.

ghost commented 6 years ago

ive only ever had buckets on me. They dont seem affected by it.

ghost commented 6 years ago

My toolbox also seemed to disappear on death...

malte0811 commented 6 years ago

What disapears, the toolbox or its content?

ghost commented 6 years ago

Neither. Im an idiot. Apologies fo that. Apparently I stashed it in a chest awhile ago and forget. Died and then couldnt find it in my inv when I recovered my body.

Flow86 commented 6 years ago

same problem in "Sevtech Ages" mod pack. any progress in forge about that issue yet?

mindforger commented 6 years ago

same problem in "Sevtech Ages" mod pack. any progress in forge about that issue yet?

why don't you ask that on the forge tracker?

i mean the link is literally there 7 posts above yours

Mugiwaxar commented 6 years ago

Same issue Here All the content disapear without reasons

lantren commented 6 years ago

another "me too" . Toolbox became empty. Sponge server. forge 2705 just FYI

PrincessRTFM commented 6 years ago

It has been firmly established that this is an issue in Forge, not IE. I think it's safe to stop reporting it here (to the people who can't do anything about it) and probably close the issue. Everyone changing game modes will just need to remember to safely store the affected items before doing so until the Forge team can solve this, because the devs here have nothing to do.

CorwinCZ commented 6 years ago

Would it be possible to add hint of this bug into Engineer's Manual? So the user is warned before he/she looses his/hers items :)

ViciousVinnyD commented 5 years ago

I've also had this happen to crates, guns, speedloaders, basically anything that can contain items. I have not been able to reproduce this bug using Betweenlands and Thermal Expansion pouches. Is it in any way possible for this mod to borrow their code until forge fixes whatever's breaking this?

malte0811 commented 5 years ago

Without looking at their code I can tell you that they will be affected by a bug that, in my opinion, is worse than item loss to a person who will be able to cheat in the lost items: You may have heard about disconnects and crashes when filling a bag with NBT-heavy items (standard example would be a bunch of other bags filled with bees). This happens because the NBT data sent to the client becomes too large and triggers MC's "spam filter". The only way to fix this (short of removing the spam filter, which I won't do) is to not send as much data to the client, to only send the information needed to render the item (e.g. upgrades), but nothing else (e.g. a bags content). This works perfectly fine most of the time and Forge made it possible specifically for this use case. However the creative menu on dedicated servers works in weird ways: I haven't looked at the code involved for a long time, but essentially the client tells the server what items it has in its inventory every time it's opened or modified through the creative menu, and the server believes the client (since the creative menu is completely client-side). So the client overrides the server's version of the toolbox/... with its own, which doesn't have any contents, because we didn't send those to prevent people from getting disconnected until someone edits their NBT data (which they usually won't be able to do themself).

Chaoschaot232 commented 3 years ago

Even if outdated but wasn't there any possible work arround? Especialy for current MC Version (if the bug still exists there)? Some Mods, like AS and TC are storing there contents outside the players main DAT File so why not making it the same way and sending just before the switch into creative is done the NBT Data to store?

Since you are in Creative, you have access to all high end tools so even if items are lost, it is not relevant at this point. Only after the player switches back to survival. When this is finished, read out the additional NBT File from the server side so that the previous lose doesn't get's recognized. And since this only involes switching between modes, it shouldn't act as duplication bug.

Well, this is only my point of few and from what I have read because I encountered in FTB Rev 3.4 (updated manually almost all mods to there latest 1.12.2 ones) but I am be able to overwrite my player file if such things happen and I also know that 1.12.2 is mayb no longer supported, am I right? So it is only a personal question what could have had a well solution ;)

Shibva commented 1 year ago

this issue still seems to be prelivant in servers to this day. My stuff randomly got voided as I was switching from creative and back to survival on a creative server when testing some things

a fix should be made to this issue because its clear that forge is not fixing this issue

encountered on 18.2 at ver 1.18.2-8.3.0-155.jar

Shibva commented 1 year ago

Might not be the same; however, it seems to be tripped when opening hotbar tab that has heavy NBT data stored in it

If I have to take a wild guess with what little I know; this first time opening up a tab in a game instance trips the NBT-deadlock prevention method and voids the contents as a result. Simply put in my perspective: triggered by a false positive.

LemADEC commented 1 year ago

The original issue has nothing to do with NBT data size. It was more frequent for players with higher permissions, like an OP playing in survival mode. That being said, the exact trigger & root-cause remain unknown to me to this day.

Shibva commented 1 year ago

Without looking at their code I can tell you that they will be affected by a bug that, in my opinion, is worse than item loss to a person who will be able to cheat in the lost items: You may have heard about disconnects and crashes when filling a bag with NBT-heavy items (standard example would be a bunch of other bags filled with bees). This happens because the NBT data sent to the client becomes too large and triggers MC's "spam filter". The only way to fix this (short of removing the spam filter, which I won't do) is to not send as much data to the client, to only send the information needed to render the item (e.g. upgrades), but nothing else (e.g. a bags content). This works perfectly fine most of the time and Forge made it possible specifically for this use case. However the creative menu on dedicated servers works in weird ways: I haven't looked at the code involved for a long time, but essentially the client tells the server what items it has in its inventory every time it's opened or modified through the creative menu, and the server believes the client (since the creative menu is completely client-side). So the client overrides the server's version of the toolbox/... with its own, which doesn't have any contents, because we didn't send those to prevent people from getting disconnected until someone edits their NBT data (which they usually won't be able to do themself).

it could also be this