mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 04:09:45 +00:00
Abstracted gui option list and added patreon button
This commit is contained in:
1 parent
ff5456cbd1
commit
d7753d2e78
18 files changed
+253
-149
No files matched your search
@@ -45,16 +45,21 @@ public abstract class Option
|
||||
return 20;
|
||||
}
|
||||
|
||||
private <T> T assertParentOverride(T elem) {
|
||||
if(elem == null) throw new IllegalStateException("Option "+fullName()+" does not have a defined parent list. Use OptionList.setOptionList to insert a parent");
|
||||
return elem;
|
||||
}
|
||||
|
||||
public ConfigSet globalConfigSet() {
|
||||
return parent.globalConfigSet();
|
||||
return assertParentOverride(parent.globalConfigSet());
|
||||
}
|
||||
|
||||
public ConfigSet worldConfigSet() {
|
||||
return parent.worldConfigSet();
|
||||
return assertParentOverride(parent.worldConfigSet());
|
||||
}
|
||||
|
||||
public OptionList configBase() {
|
||||
return parent.configBase();
|
||||
return assertParentOverride(parent.configBase());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user