mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-22 13:09:45 +00:00
Cleaned and generalised item loading/searching
Reimplemented subsets Added regex searching Fixed format error on delete all Fixed GuiButton handling clicks before NEI widgets could override Re-Implemented banned blocks implementation Added brewing recipes again note test obf ASM beacons Fixed some calls being intercepted by item panel when mouse was over a gui element Fixed crash on closing potion window with escape Disabled fast transfer, scrolling, and drag 'n' drop in creative Added item panel sorting Removed TMI uninstaller Fixed /give command Updated to 1.7.10
This commit is contained in:
1 parent
3c9ebc6961
commit
3c84527806
67 files changed
+3251
-2319
No files matched your search
@@ -2,55 +2,43 @@ package codechicken.nei;
|
||||
|
||||
public class ItemQuantityField extends TextField
|
||||
{
|
||||
public ItemQuantityField(String ident)
|
||||
{
|
||||
public ItemQuantityField(String ident) {
|
||||
super(ident);
|
||||
centered = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValid(String string)
|
||||
{
|
||||
if(string.equals(""))
|
||||
public boolean isValid(String string) {
|
||||
if (string.equals(""))
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
try {
|
||||
return Integer.parseInt(string) >= 0;
|
||||
}
|
||||
catch(NumberFormatException nfe)
|
||||
{
|
||||
} catch (NumberFormatException nfe) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public int intValue()
|
||||
{
|
||||
|
||||
public int intValue() {
|
||||
return intValue(text());
|
||||
}
|
||||
|
||||
public int intValue(String s)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
public int intValue(String s) {
|
||||
try {
|
||||
return Integer.parseInt(s);
|
||||
}
|
||||
catch(NumberFormatException nfe)
|
||||
{
|
||||
} catch (NumberFormatException nfe) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loseFocus()
|
||||
{
|
||||
public void loseFocus() {
|
||||
setText(Integer.toString(NEIClientConfig.getItemQuantity()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChange(String oldText)
|
||||
{
|
||||
if(intValue(oldText) != intValue())//hacky recursion stopper
|
||||
public void onTextChange(String oldText) {
|
||||
if (intValue(oldText) != intValue())//hacky recursion stopper
|
||||
NEIClientUtils.setItemQuantity(intValue());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user