Tom's Simple Storage Mod (Fabric)

Tom's Simple Storage Mod (Fabric)

16M Downloads

[1.18-1.21] [BUG] Terminal cannot keep the search keyword field

Tidy-Bear opened this issue · 0 comments

commented

Version

  • MC: 1.18.2 - 1.21
  • Tom‘s Simple Storage: latest of each MC version

Description

Set the search type to xxx keep, type any keywords and reopen the terminal, no text is kept in the search box.

if(!loadedSearch && menu.search != null) {
loadedSearch = true;
if((searchType & 2) > 0)
searchField.setValue(menu.search);
}

There is an implementation of filling searchField with the value of menu.search during screen initialization, but the problem is that menu is also a totally new instance whenever the screen is to open, which means menu.search is always null if no additional sync.