From 883aa7a2bbc3a23fb18fbb881e9890c066666ed9 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Wed, 24 Jun 2015 21:44:51 +0100 Subject: Still trying to fix this bloddy GUI error --- .../darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java index 9ed23b4..9c5d7be 100644 --- a/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java +++ b/src/main/java/darkknight/jewelrycraft/client/gui/GuiJewelryModifier.java @@ -66,7 +66,7 @@ public class GuiJewelryModifier extends GuiContainer { public void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { int i = 0; for (ItemStack item : JewelrycraftUtil.objects) { - if (item != null && item.getDisplayName() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { + if (item != null && item.getItem() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { GL11.glDisable(GL11.GL_LIGHTING); GL11.glColor3f(1F, 1F, 1F); GL11.glEnable(GL11.GL_LIGHTING); @@ -87,7 +87,7 @@ public class GuiJewelryModifier extends GuiContainer { if (this.searchField.textboxKeyTyped(character, key)) { int items = 0; for (ItemStack item : JewelrycraftUtil.objects) - if (item != null && searchField.getText() != "" && item.getDisplayName() != null && item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())) items++; + if (item != null && searchField.getText() != "" && item.getItem() != null && item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase())) items++; maxPages = items / 48 + 1; page = 1; this.pages.setText(page + "/" + maxPages); @@ -121,7 +121,7 @@ public class GuiJewelryModifier extends GuiContainer { } int i = 0; for (ItemStack item : JewelrycraftUtil.objects) { - if (item != null && item.getDisplayName() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { + if (item != null && item.getItem() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)) { try { if (!((GuiButton) buttonList.get(0)).enabled || !((GuiButton) buttonList.get(1)).enabled || !((GuiButton) buttonList.get(2)).enabled) { @@ -205,7 +205,7 @@ public class GuiJewelryModifier extends GuiContainer { int i = 0; List list = new ArrayList(); for (ItemStack item : JewelrycraftUtil.objects) { - if (item != null && item.getDisplayName() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { + if (item != null && item.getItem() != null && (this.searchField.getText() == "" || item.getDisplayName().toLowerCase().contains(this.searchField.getText().toLowerCase()))) { if (i >= (page - 1) * 48 && i < page * 48 && x >= this.guiLeft + 88 + 20 * (i % 6) && x < this.guiLeft + 108 + 20 * (i % 6) && y >= this.guiTop + 9 + 17 * (i / 6) - 136 * (page - 1) && y < this.guiTop + 25 + 17 * (i / 6) - 136 * (page - 1)) { list.add(item.getDisplayName()); if (item.getTooltip(mc.thePlayer, mc.gameSettings.advancedItemTooltips) != null) this.renderToolTip(item, x, y); -- cgit v1.2.3