Small fixes & changes (#523)

* fix hotkeys

* code cleanup

* fix recipe tooltip overlay

* search item by original name

* overlay button refactoring

* fix subset filter

* change keyname; issue 524

* cleanup code

* move overlayformat logic

---------

Co-authored-by: slprime <[email protected]>
This commit is contained in:
slprimeandslprime authored and GitHub committed 2024-09-01 22:19:12 +02:00
1 parent bd5e991a84
commit 65652e5896
15 files changed
+166 -98

No files matched your search

+13 -1
View File
@@ -91,7 +91,19 @@ public class ItemList {
@Override
public boolean matches(ItemStack item) {
String displayName = EnumChatFormatting.getTextWithoutFormattingCodes(item.getDisplayName());
return !displayName.isEmpty() && pattern.matcher(displayName).find();
if (!displayName.isEmpty() && pattern.matcher(displayName).find()) {
return true;
}
if (item.hasDisplayName()) {
displayName = EnumChatFormatting
.getTextWithoutFormattingCodes(item.getItem().getItemStackDisplayName(item));
return !displayName.isEmpty() && pattern.matcher(displayName).find();
}
return false;
}
}