From 1f59e441b872af19126270aae55b2f8f6816cb57 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Wed, 6 Nov 2013 19:44:52 -0500 Subject: [PATCH] Fix a few things --- common/mekanism/client/gui/GuiItemStackFilter.java | 13 +++++++++---- .../common/transporter/ItemStackFilter.java | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/common/mekanism/client/gui/GuiItemStackFilter.java b/common/mekanism/client/gui/GuiItemStackFilter.java index 0ff4296d1..4c8e24132 100644 --- a/common/mekanism/client/gui/GuiItemStackFilter.java +++ b/common/mekanism/client/gui/GuiItemStackFilter.java @@ -91,7 +91,7 @@ public class GuiItemStackFilter extends GuiMekanism if(guibutton.id == 0) { - if(filter.itemType != null && !minField.getText().isEmpty() && !maxField.getText().isEmpty()) + if(filter.itemType != null && !minField.getText().isEmpty() && !maxField.getText().isEmpty() && Integer.parseInt(maxField.getText()) >= Integer.parseInt(minField.getText())) { filter.min = Integer.parseInt(minField.getText()); filter.max = Integer.parseInt(maxField.getText()); @@ -116,6 +116,11 @@ public class GuiItemStackFilter extends GuiMekanism status = EnumColor.DARK_RED + "Max/min"; ticker = 20; } + else if(Integer.parseInt(maxField.getText()) < Integer.parseInt(minField.getText())) + { + status = EnumColor.DARK_RED + "Max= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35) { @@ -256,9 +264,6 @@ public class GuiItemStackFilter extends GuiMekanism GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glPopMatrix(); } - - minField.drawTextBox(); - maxField.drawTextBox(); } @Override diff --git a/common/mekanism/common/transporter/ItemStackFilter.java b/common/mekanism/common/transporter/ItemStackFilter.java index 8fd785731..87d2f687f 100644 --- a/common/mekanism/common/transporter/ItemStackFilter.java +++ b/common/mekanism/common/transporter/ItemStackFilter.java @@ -31,7 +31,7 @@ public class ItemStackFilter extends TransporterFilter { return false; } - + return itemType.isItemEqual(itemStack) && (!sizeMode || itemStack.stackSize >= min); }