mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 04:09:45 +00:00
Update buildscript & apply automatic formatting rules
This commit is contained in:
1 parent
a7683b885d
commit
f7a900e910
173 files changed
+4581
-5321
No files matched your search
@@ -2,17 +2,17 @@ package codechicken.nei.config;
|
||||
|
||||
import codechicken.lib.config.ConfigTag;
|
||||
import codechicken.nei.config.GuiOptionList.OptionScrollSlot;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class Option
|
||||
{
|
||||
public abstract class Option {
|
||||
public static void playClickSound() {
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
Minecraft.getMinecraft()
|
||||
.getSoundHandler()
|
||||
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
|
||||
public OptionScrollSlot slot;
|
||||
@@ -46,7 +46,9 @@ public abstract class Option
|
||||
}
|
||||
|
||||
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");
|
||||
if (elem == null)
|
||||
throw new IllegalStateException("Option " + fullName()
|
||||
+ " does not have a defined parent list. Use OptionList.setOptionList to insert a parent");
|
||||
return elem;
|
||||
}
|
||||
|
||||
@@ -158,8 +160,7 @@ public abstract class Option
|
||||
* Deletes a specific named tag from the worldConfig
|
||||
*/
|
||||
public void useGlobal(String s) {
|
||||
if (worldConfig())
|
||||
worldConfigSet().config.removeTag(s);
|
||||
if (worldConfig()) worldConfigSet().config.removeTag(s);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,14 +178,11 @@ public abstract class Option
|
||||
}
|
||||
|
||||
public void copyGlobal(String s, boolean recursive) {
|
||||
if (!worldConfig())
|
||||
return;
|
||||
if (!worldConfig()) return;
|
||||
|
||||
ConfigTag tag = globalConfigSet().config.getTag(s);
|
||||
worldConfigSet().config.getTag(s).setValue(tag.getValue());
|
||||
if(recursive)
|
||||
for(String s2 : tag.childTagMap().keySet())
|
||||
copyGlobal(s+"."+s2);
|
||||
if (recursive) for (String s2 : tag.childTagMap().keySet()) copyGlobal(s + "." + s2);
|
||||
}
|
||||
|
||||
public void onAdded(OptionScrollSlot slot) {
|
||||
@@ -198,20 +196,15 @@ public abstract class Option
|
||||
/**
|
||||
* Mouse coordinates are relative to screen
|
||||
*/
|
||||
public void onMouseClicked(int mx, int my, int button) {
|
||||
}
|
||||
public void onMouseClicked(int mx, int my, int button) {}
|
||||
|
||||
public void mouseClicked(int mx, int my, int button) {
|
||||
}
|
||||
public void mouseClicked(int mx, int my, int button) {}
|
||||
|
||||
public void update() {
|
||||
}
|
||||
public void update() {}
|
||||
|
||||
public void draw(int mx, int my, float frame) {
|
||||
}
|
||||
public void draw(int mx, int my, float frame) {}
|
||||
|
||||
public void keyTyped(char c, int keycode) {
|
||||
}
|
||||
public void keyTyped(char c, int keycode) {}
|
||||
|
||||
public List<String> handleTooltip(int mx, int my, List<String> currenttip) {
|
||||
return currenttip;
|
||||
|
||||
Reference in new issue
Block a user