if(isNew)
{
Mekanism.packetHandler.sendToServer(new NewFilterMessage(Coord4D.get(tileEntity), filter));
}
else {
Mekanism.packetHandler.sendToServer(new EditFilterMessage(Coord4D.get(tileEntity), false, origFilter, filter));
}
Mekanism.packetHandler.sendToServer(new LogisticalSorterGuiMessage(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0, 0, 0));
}
else if(min > max)
{
status = EnumColor.DARK_RED + "Max<min";
ticker = 20;
}
else if(max > 64 || min > 64)
{
status = EnumColor.DARK_RED + "Max>64";
ticker = 20;
}
}
else if(filter.itemType == null)
{
status = EnumColor.DARK_RED + "No item";
ticker = 20;
}
else if(minField.getText().isEmpty() || maxField.getText().isEmpty())
{
status = EnumColor.DARK_RED + "Max/min";
ticker = 20;
}
}
else if(guibutton.id == 1)
{
Mekanism.packetHandler.sendToServer(new EditFilterMessage(Coord4D.get(tileEntity), true, origFilter, null));
Mekanism.packetHandler.sendToServer(new LogisticalSorterGuiMessage(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0, 0, 0));
}
}