diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2022-11-03 17:30:13 +0000 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2022-11-08 16:36:33 +0000 |
commit | 5b9bfe8891f007a9dcec1a4754df6bc62e0396eb (patch) | |
tree | 55025556bd049d0bd8a68b2e0163ddb75971c808 /libraries/launcher/net | |
parent | 779bc2c63df131fce0d230401a5a891eb2eb8794 (diff) | |
download | PrismLauncher-5b9bfe8891f007a9dcec1a4754df6bc62e0396eb.tar.gz PrismLauncher-5b9bfe8891f007a9dcec1a4754df6bc62e0396eb.tar.bz2 PrismLauncher-5b9bfe8891f007a9dcec1a4754df6bc62e0396eb.zip |
Attempt to mimic clang-format
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'libraries/launcher/net')
-rw-r--r-- | libraries/launcher/net/minecraft/Launcher.java | 65 |
1 files changed, 28 insertions, 37 deletions
diff --git a/libraries/launcher/net/minecraft/Launcher.java b/libraries/launcher/net/minecraft/Launcher.java index 796e4829..ce9b59d4 100644 --- a/libraries/launcher/net/minecraft/Launcher.java +++ b/libraries/launcher/net/minecraft/Launcher.java @@ -68,7 +68,8 @@ import java.util.TreeMap; /** * WARNING: This class is reflectively accessed by legacy Forge versions. * <p> - * Changing field and method declarations without further testing is not recommended. + * Changing field and method declarations without further testing is not + * recommended. */ public final class Launcher extends Applet implements AppletStub { @@ -80,11 +81,10 @@ public final class Launcher extends Applet implements AppletStub { private final URL documentBase; private boolean active = false; - public Launcher(Applet applet) { - this(applet, null); - } + public Launcher(Applet applet) { this(applet, null); } - public Launcher(Applet applet, URL documentBase) { + public Launcher(Applet applet, URL documentBase) + { setLayout(new BorderLayout()); this.add(applet, "Center"); @@ -108,7 +108,8 @@ public final class Launcher extends Applet implements AppletStub { } } - public void replace(Applet applet) { + public void replace(Applet applet) + { wrappedApplet = applet; applet.setStub(this); @@ -127,17 +128,14 @@ public final class Launcher extends Applet implements AppletStub { } @Override - public boolean isActive() { - return active; - } + public boolean isActive() { return active; } @Override - public URL getDocumentBase() { - return documentBase; - } + public URL getDocumentBase() { return documentBase; } @Override - public URL getCodeBase() { + public URL getCodeBase() + { try { // TODO: 2022-10-27 Can this be changed to https? return new URL("http://www.minecraft.net/game/"); @@ -147,7 +145,8 @@ public final class Launcher extends Applet implements AppletStub { } @Override - public String getParameter(String name) { + public String getParameter(String name) + { String param = params.get(name); if (param != null) @@ -162,62 +161,54 @@ public final class Launcher extends Applet implements AppletStub { } @Override - public void resize(int width, int height) { - wrappedApplet.resize(width, height); - } + public void resize(int width, int height) { wrappedApplet.resize(width, height); } @Override - public void resize(Dimension size) { - wrappedApplet.resize(size); - } + public void resize(Dimension size) { wrappedApplet.resize(size); } @Override - public void init() { + public void init() + { if (wrappedApplet != null) wrappedApplet.init(); } @Override - public void start() { + public void start() + { wrappedApplet.start(); active = true; } @Override - public void stop() { + public void stop() + { wrappedApplet.stop(); active = false; } @Override - public void destroy() { - wrappedApplet.destroy(); - } + public void destroy() { wrappedApplet.destroy(); } @Override - public void appletResize(int width, int height) { - wrappedApplet.resize(width, height); - } + public void appletResize(int width, int height) { wrappedApplet.resize(width, height); } @Override - public void setVisible(boolean visible) { + public void setVisible(boolean visible) + { super.setVisible(visible); wrappedApplet.setVisible(visible); } @Override - public void paint(Graphics graphics) { - } + public void paint(Graphics graphics) {} @Override - public void update(Graphics graphics) { - } + public void update(Graphics graphics) {} - public void setParameter(String name, String value) { - params.put(name, value); - } + public void setParameter(String name, String value) { params.put(name, value); } } |