mrbuilder1961 / ChatPatches

A Minecraft client-side mod that touches up Minecraft's mundane chat, with configurability in mind!
GNU Lesser General Public License v3.0
43 stars 16 forks source link

History lost when minecraft is killed - 201.5.5 #134

Closed Nemo157 closed 7 months ago

Nemo157 commented 7 months ago

Description

If minecraft is killed for some reason (e.g. OOM) the history from the latest session is not recorded.

How to reproduce

Join a server, have some chat, kill -9 minecraft, rejoin server and notice there is no chat.

Expected result

The history should have been saved already and reappear when rejoining.

Specs and Details

Additional context

I'd highly recommend using sqlite for storing the history, to make it easier to insert lines as they're received and avoid corrupting it if there is a crash while saving.

mrbuilder1961 commented 7 months ago

i think my solution for this will just be to save the ChatLog when the game autosaves (singleplayer) or on some other, probably customizable interval. i'll also make sure to put manual buttons in the config for saving/loading/emptying it.

however, be warned this solution will release for the latest version first, likely 1.20.2. i would try to update to 1.20.2 if possible

mrbuilder1961 commented 7 months ago

Should be fixed in v202.6.0! i will backport the fix to 1.20.1 and other versions eventually, but in the meantime please update to 1.20.2 and please reopen this issue if it still occurs for you. thanks!