mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-26 15:03:10 +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
@@ -4,63 +4,53 @@ public class OptionCycled extends OptionButton
|
||||
{
|
||||
public final int count;
|
||||
public final boolean prefixed;
|
||||
|
||||
public OptionCycled(String name, int count, boolean prefixed)
|
||||
{
|
||||
|
||||
public OptionCycled(String name, int count, boolean prefixed) {
|
||||
super(name);
|
||||
this.count = count;
|
||||
this.prefixed = prefixed;
|
||||
}
|
||||
|
||||
public OptionCycled(String name, int count)
|
||||
{
|
||||
|
||||
public OptionCycled(String name, int count) {
|
||||
this(name, count, false);
|
||||
}
|
||||
|
||||
public int value()
|
||||
{
|
||||
|
||||
public int value() {
|
||||
return renderTag().getIntValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getButtonText()
|
||||
{
|
||||
return translateN(name+"."+value());
|
||||
public String getButtonText() {
|
||||
return translateN(name + "." + value());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getPrefix()
|
||||
{
|
||||
public String getPrefix() {
|
||||
return prefixed ? translateN(name) : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button)
|
||||
{
|
||||
if(renderDefault())
|
||||
public boolean onClick(int button) {
|
||||
if (defaulting())
|
||||
return false;
|
||||
|
||||
|
||||
return cycle();
|
||||
}
|
||||
|
||||
public boolean cycle()
|
||||
{
|
||||
|
||||
public boolean cycle() {
|
||||
int next = value();
|
||||
do
|
||||
{
|
||||
next=(next+1)%count;
|
||||
}
|
||||
while(!optionValid(next));
|
||||
|
||||
if(next == value())
|
||||
next = (next + 1) % count;
|
||||
while (!optionValid(next));
|
||||
|
||||
if (next == value())
|
||||
return false;
|
||||
|
||||
|
||||
getTag().setIntValue(next);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean optionValid(int index)
|
||||
{
|
||||
|
||||
public boolean optionValid(int index) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user