From dca761645877bfd33450f4fa56cda7672dfae7ee Mon Sep 17 00:00:00 2001 From: Richard Gonlag Date: Tue, 23 Jun 2020 04:25:37 +0200 Subject: [PATCH] Added search functionality for custom named items --- build.gradle | 2 +- .../at/feldim2425/moreoverlays/itemsearch/GuiRenderer.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d7f82e2..36b9595 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.17.2-mc1.15.2' +version = '1.17.3-mc1.15.2' group = 'at.feldim2425.moreoverlays' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'moreoverlays' diff --git a/src/main/java/at/feldim2425/moreoverlays/itemsearch/GuiRenderer.java b/src/main/java/at/feldim2425/moreoverlays/itemsearch/GuiRenderer.java index 729f862..8026e9f 100644 --- a/src/main/java/at/feldim2425/moreoverlays/itemsearch/GuiRenderer.java +++ b/src/main/java/at/feldim2425/moreoverlays/itemsearch/GuiRenderer.java @@ -197,6 +197,9 @@ private void checkSlots(ContainerScreen container) { } private boolean isSearchedItem(ItemStack stack) { + if(stack.getDisplayName().getFormattedText().toLowerCase().contains(JeiModule.getJEITextField().getText().toLowerCase())) { + return true; + } if (emptyFilter) return true; else if (stack.isEmpty()) return false; for (Object ingredient : JeiModule.filter.getFilteredIngredients()) {