Commit fdb36ae1376359126e34c37f63a2792bc38f9bd4

Authored by Mumfrey
1 parent 3781bd92

Style update part 3 - apply checkstyle

Showing 100 changed files with 1045 additions and 508 deletions

Too many changes to show.

To preserve performance only 100 of 219 files are displayed.

build.gradle
... ... @@ -17,6 +17,7 @@ buildscript {
17 17 }
18 18  
19 19 apply plugin: 'net.minecraftforge.gradle.tweaker-client'
  20 +apply plugin: 'checkstyle'
20 21 apply plugin: 'maven'
21 22  
22 23 // Artefact details
... ... @@ -60,6 +61,17 @@ sourceSets {
60 61 }
61 62 }
62 63  
  64 +checkstyle {
  65 + configProperties = [
  66 + "name" : project.name,
  67 + "organization": project.organization,
  68 + "url" : project.url,
  69 + "year" : project.inceptionYear
  70 + ]
  71 + configFile = file("checkstyle.xml")
  72 + toolVersion = '6.13'
  73 +}
  74 +
63 75 javadoc {
64 76 source sourceSets.client.allJava
65 77 source sourceSets.debug.allJava
... ... @@ -110,7 +122,7 @@ task runClient(type: JavaExec, overwrite: true) {
110 122 }
111 123  
112 124 tasks.withType(JavaCompile) {
113   - options.compilerArgs += ['-Xlint:all', '-Xlint:-path']
  125 + options.compilerArgs += ['-Xlint:all', '-Xlint:-path', '-Xlint:-rawtypes']
114 126 options.deprecation = true
115 127 options.encoding = 'utf8'
116 128 }
... ...
checkstyle.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
  3 +
  4 +<!--
  5 + This configuration file was written by the eclipse-cs plugin configuration editor
  6 +-->
  7 +<!--
  8 + Checkstyle-Configuration: LiteLoader Style
  9 + Description: none
  10 +-->
  11 +<module name="Checker">
  12 + <property name="severity" value="warning"/>
  13 + <property name="charset" value="UTF-8"/>
  14 + <module name="TreeWalker">
  15 + <module name="FileContentsHolder"/>
  16 + <module name="OuterTypeFilename"/>
  17 + <module name="IllegalTokenText">
  18 + <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
  19 + <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
  20 + <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
  21 + </module>
  22 + <module name="EmptyBlock">
  23 + <property name="option" value="TEXT"/>
  24 + <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
  25 + </module>
  26 + <module name="ArrayTypeStyle"/>
  27 + <module name="MissingSwitchDefault"/>
  28 + <module name="FallThrough"/>
  29 + <module name="UpperEll"/>
  30 + <module name="ModifierOrder"/>
  31 + <module name="PackageName">
  32 + <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
  33 + <message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
  34 + </module>
  35 + <module name="TypeName">
  36 + <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
  37 + </module>
  38 + <module name="MemberName">
  39 + <property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
  40 + <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
  41 + </module>
  42 + <module name="ParameterName">
  43 + <property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
  44 + <message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
  45 + </module>
  46 + <module name="LocalVariableName">
  47 + <property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
  48 + <property name="tokens" value="VARIABLE_DEF"/>
  49 + <message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
  50 + </module>
  51 + <module name="ClassTypeParameterName">
  52 + <property name="format" value="(^[A-Z][0-9]?)$|(T[A-Z][a-zA-Z0-9]*$)"/>
  53 + <message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
  54 + </module>
  55 + <module name="MethodTypeParameterName">
  56 + <property name="format" value="(^[A-Z][0-9]?)$|(T[A-Z][a-zA-Z0-9]*$)"/>
  57 + <message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
  58 + </module>
  59 + <module name="NoFinalizer"/>
  60 + <module name="OperatorWrap">
  61 + <property name="option" value="NL"/>
  62 + <property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
  63 + </module>
  64 + <module name="RequireThis"/>
  65 + <module name="EqualsHashCode"/>
  66 + <module name="LeftCurly">
  67 + <property name="option" value="nl"/>
  68 + </module>
  69 + <module name="MethodParamPad">
  70 + <property name="allowLineBreaks" value="true"/>
  71 + <property name="tokens" value="CTOR_DEF,METHOD_CALL,METHOD_DEF,SUPER_CTOR_CALL"/>
  72 + </module>
  73 + <module name="LineLength">
  74 + <metadata name="net.sf.eclipsecs.core.comment" value="Code line length"/>
  75 + <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
  76 + <property name="max" value="150"/>
  77 + <message key="maxLineLen" value="Code line is longer than {0,number,integer} characters (found {1,number,integer})."/>
  78 + </module>
  79 + <module name="LineLength">
  80 + <metadata name="net.sf.eclipsecs.core.comment" value="Comment line length"/>
  81 + <property name="ignorePattern" value="^[ ]*([a-zA-Z0-9\{\}\+\|\&amp;\&quot;@\(\)\?\:\.=]|//)"/>
  82 + <message key="maxLineLen" value="Comment line is longer than {0,number,integer} characters (found {1,number,integer})."/>
  83 + </module>
  84 + <module name="NeedBraces">
  85 + <property name="allowSingleLineStatement" value="true"/>
  86 + <message key="needBraces" value="''{0}'' must use '''{}'''s."/>
  87 + </module>
  88 + <module name="RightCurly">
  89 + <property name="option" value="alone"/>
  90 + <property name="tokens" value="LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_IF,LITERAL_ELSE,CLASS_DEF,METHOD_DEF,CTOR_DEF,LITERAL_FOR,LITERAL_WHILE,LITERAL_DO,STATIC_INIT,INSTANCE_INIT"/>
  91 + <property name="shouldStartLine" value="false"/>
  92 + </module>
  93 + <module name="MissingOverride">
  94 + <property name="severity" value="error"/>
  95 + </module>
  96 + <module name="MissingDeprecated">
  97 + <property name="severity" value="warning"/>
  98 + </module>
  99 + <module name="TypecastParenPad">
  100 + <property name="tokens" value="RPAREN,TYPECAST"/>
  101 + </module>
  102 + <module name="DefaultComesLast"/>
  103 + <module name="EmptyStatement"/>
  104 + <module name="EqualsAvoidNull"/>
  105 + <module name="StringLiteralEquality"/>
  106 + <module name="FinalClass"/>
  107 + </module>
  108 + <module name="SuppressionCommentFilter"/>
  109 +</module>
... ...
src/client/java/com/mumfrey/liteloader/ChatFilter.java
... ... @@ -13,11 +13,13 @@ import net.minecraft.util.IChatComponent;
13 13 public interface ChatFilter extends LiteMod
14 14 {
15 15 /**
16   - * Chat filter function, return false to filter this packet, true to pass the packet
  16 + * Chat filter function, return false to filter this packet, true to pass
  17 + * the packet.
17 18 *
18 19 * @param chat ChatMessageComponent parsed from the chat packet
19 20 * @param message Chat message parsed from the chat message component
20   - * @param newMessage If you wish to mutate the message, set the value using newMessage.set()
  21 + * @param newMessage If you wish to mutate the message, set the value using
  22 + * newMessage.set()
21 23 *
22 24 * @return True to keep the packet, false to discard
23 25 */
... ...
src/client/java/com/mumfrey/liteloader/EntityRenderListener.java
... ... @@ -4,7 +4,8 @@ import net.minecraft.client.renderer.entity.Render;
4 4 import net.minecraft.entity.Entity;
5 5  
6 6 /**
7   - * Interface for mods which want to receive callbacks when entities are rendered into the world
  7 + * Interface for mods which want to receive callbacks when entities are rendered
  8 + * into the world.
8 9 *
9 10 * @author Adam Mummery-Smith
10 11 */
... ...
src/client/java/com/mumfrey/liteloader/FrameBufferListener.java
... ... @@ -3,20 +3,23 @@ package com.mumfrey.liteloader;
3 3 import net.minecraft.client.shader.Framebuffer;
4 4  
5 5 /**
6   - * Interface for mods which want to interact with Minecraft's main Frame Buffer Object
  6 + * Interface for mods which want to interact with Minecraft's main Frame Buffer
  7 + * Object.
7 8 *
8 9 * @author Adam Mummery-Smith
9 10 */
10 11 public interface FrameBufferListener extends LiteMod
11 12 {
12 13 /**
13   - * Called before the FBO is rendered. Useful if you want to interact with the FBO before it is drawn to the screen
  14 + * Called before the FBO is rendered. Useful if you want to interact with
  15 + * the FBO before it is drawn to the screen.
14 16 */
15 17 public abstract void preRenderFBO(Framebuffer fbo);
16 18  
17 19 /**
18   - * Called immediately before the FBO is rendered to the screen, after the appropriate IGL modes and matrix transforms
19   - * have been set but before the FBO is actually rendered into the main output buffer.
  20 + * Called immediately before the FBO is rendered to the screen, after the
  21 + * appropriate IGL modes and matrix transforms have been set but before the
  22 + * FBO is actually rendered into the main output buffer.
20 23 *
21 24 * @param fbo FBO instance
22 25 * @param width FBO width
... ...
src/client/java/com/mumfrey/liteloader/InitCompleteListener.java
... ... @@ -5,15 +5,17 @@ import net.minecraft.client.Minecraft;
5 5 import com.mumfrey.liteloader.core.LiteLoader;
6 6  
7 7 /**
8   - * Interface for mods which need to initialise stuff once the game initialisation is completed,
9   - * for example mods which need to register new renderers.
  8 + * Interface for mods which need to initialise stuff once the game
  9 + * initialisation is completed, for example mods which need to register new
  10 + * renderers.
10 11 *
11 12 * @author Adam Mummery-Smith
12 13 */
13 14 public interface InitCompleteListener extends Tickable
14 15 {
15 16 /**
16   - * Called as soon as the game is initialised and the main game loop is running
  17 + * Called as soon as the game is initialised and the main game loop is
  18 + * running.
17 19 *
18 20 * @param minecraft Minecraft instance
19 21 * @param loader LiteLoader instance
... ...
src/client/java/com/mumfrey/liteloader/JoinGameListener.java
... ... @@ -8,7 +8,8 @@ import com.mojang.realmsclient.dto.RealmsServer;
8 8  
9 9  
10 10 /**
11   - * Interface for mods which wish to be notified when the player connects to a server (or local game)
  11 + * Interface for mods which wish to be notified when the player connects to a
  12 + * server (or local game).
12 13 *
13 14 * @author Adam Mummery-Smith
14 15 */
... ... @@ -19,8 +20,10 @@ public interface JoinGameListener extends LiteMod
19 20 *
20 21 * @param netHandler Net handler
21 22 * @param joinGamePacket Join game packet
22   - * @param serverData ServerData object representing the server being connected to
23   - * @param realmsServer If connecting to a realm, a reference to the RealmsServer object
  23 + * @param serverData ServerData object representing the server being
  24 + * connected to
  25 + * @param realmsServer If connecting to a realm, a reference to the
  26 + * RealmsServer object
24 27 */
25 28 public abstract void onJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket, ServerData serverData, RealmsServer realmsServer);
26 29 }
... ...
src/client/java/com/mumfrey/liteloader/OutboundChatFilter.java
... ... @@ -8,7 +8,8 @@ package com.mumfrey.liteloader;
8 8 public interface OutboundChatFilter extends LiteMod
9 9 {
10 10 /**
11   - * Raised when a chat message is being sent, return false to filter this message or true to allow it to be sent
  11 + * Raised when a chat message is being sent, return false to filter this
  12 + * message or true to allow it to be sent.
12 13 *
13 14 * @param message
14 15 */
... ...
src/client/java/com/mumfrey/liteloader/OutboundChatListener.java
... ... @@ -10,7 +10,8 @@ import net.minecraft.network.play.client.C01PacketChatMessage;
10 10 public interface OutboundChatListener extends LiteMod
11 11 {
12 12 /**
13   - * Raised when a new chat packet is created (not necessarily transmitted, something could be trolling us)
  13 + * Raised when a new chat packet is created (not necessarily transmitted,
  14 + * something could be trolling us).
14 15 *
15 16 * @param packet
16 17 * @param message
... ...
src/client/java/com/mumfrey/liteloader/PostLoginListener.java
... ... @@ -10,8 +10,9 @@ import net.minecraft.network.login.server.S02PacketLoginSuccess;
10 10 public interface PostLoginListener extends LiteMod
11 11 {
12 12 /**
13   - * Called immediately after login, before the player has properly joined the game. Note that this event is raised
14   - * <b>in the network thread</b> and is not marshalled to the main thread as other packet-generated events are.
  13 + * Called immediately after login, before the player has properly joined the
  14 + * game. Note that this event is raised <b>in the network thread</b> and is
  15 + * not marshalled to the main thread as other packet-generated events are.
15 16 *
16 17 * @param netHandler
17 18 * @param packet
... ...
src/client/java/com/mumfrey/liteloader/PreRenderListener.java
... ... @@ -10,14 +10,16 @@ import net.minecraft.client.renderer.RenderGlobal;
10 10 public interface PreRenderListener extends LiteMod
11 11 {
12 12 /**
13   - * Called immediately before rendering of the world (including the sky) is started.
  13 + * Called immediately before rendering of the world (including the sky) is
  14 + * started.
14 15 *
15 16 * @param partialTicks
16 17 */
17 18 public abstract void onRenderWorld(float partialTicks);
18 19  
19 20 /**
20   - * Called <b>after</b> the world camera transform is initialised, may be called more than once per frame if anaglyph is enabled
  21 + * Called <b>after</b> the world camera transform is initialised, may be
  22 + * called more than once per frame if anaglyph is enabled.
21 23 *
22 24 * @param partialTicks
23 25 * @param pass
... ... @@ -26,7 +28,8 @@ public interface PreRenderListener extends LiteMod
26 28 public abstract void onSetupCameraTransform(float partialTicks, int pass, long timeSlice);
27 29  
28 30 /**
29   - * Called when the sky is rendered, may be called more than once per frame if anaglyph is enabled
  31 + * Called when the sky is rendered, may be called more than once per frame
  32 + * if anaglyph is enabled.
30 33 *
31 34 * @param partialTicks
32 35 * @param pass
... ... @@ -34,7 +37,8 @@ public interface PreRenderListener extends LiteMod
34 37 public abstract void onRenderSky(float partialTicks, int pass);
35 38  
36 39 /**
37   - * Called immediately before the clouds are rendered, may be called more than once per frame if anaglyph is enabled
  40 + * Called immediately before the clouds are rendered, may be called more
  41 + * than once per frame if anaglyph is enabled.
38 42 *
39 43 * @param renderGlobal
40 44 * @param partialTicks
... ... @@ -43,7 +47,8 @@ public interface PreRenderListener extends LiteMod
43 47 public abstract void onRenderClouds(float partialTicks, int pass, RenderGlobal renderGlobal);
44 48  
45 49 /**
46   - * Called before the terrain is rendered, may be called more than once per frame if anaglyph is enabled
  50 + * Called before the terrain is rendered, may be called more than once per
  51 + * frame if anaglyph is enabled.
47 52 *
48 53 * @param partialTicks
49 54 * @param pass
... ...
src/client/java/com/mumfrey/liteloader/ScreenshotListener.java
... ... @@ -13,15 +13,16 @@ import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue;
13 13 public interface ScreenshotListener extends LiteMod
14 14 {
15 15 /**
16   - * Called when a screenshot is taken, mods should return FALSE to suspend further processing, or TRUE to allow
17   - * processing to continue normally
  16 + * Called when a screenshot is taken, mods should return FALSE to suspend
  17 + * further processing, or TRUE to allow processing to continue normally
18 18 *
19 19 * @param screenshotName
20 20 * @param width
21 21 * @param height
22 22 * @param fbo
23 23 * @param message Message to return if the event is cancelled
24   - * @return FALSE to suspend further processing, or TRUE to allow processing to continue normally
  24 + * @return FALSE to suspend further processing, or TRUE to allow processing
  25 + * to continue normally
25 26 */
26 27 public boolean onSaveScreenshot(String screenshotName, int width, int height, Framebuffer fbo, ReturnValue<IChatComponent> message);
27 28 }
... ...
src/client/java/com/mumfrey/liteloader/Tickable.java
... ... @@ -15,7 +15,8 @@ public interface Tickable extends LiteMod
15 15 * @param minecraft Minecraft instance
16 16 * @param partialTicks Partial tick value
17 17 * @param inGame True if in-game, false if in the menu
18   - * @param clock True if this is a new tick, otherwise false if it's a regular frame
  18 + * @param clock True if this is a new tick, otherwise false if it's a
  19 + * regular frame
19 20 */
20 21 public abstract void onTick(Minecraft minecraft, float partialTicks, boolean inGame, boolean clock);
21 22 }
... ...
src/client/java/com/mumfrey/liteloader/client/CallbackProxyClient.java
... ... @@ -26,9 +26,10 @@ import com.mumfrey.liteloader.transformers.event.EventInfo;
26 26 import com.mumfrey.liteloader.transformers.event.ReturnEventInfo;
27 27  
28 28 /**
29   - * Proxy class which handles the redirected calls from the injected callbacks and routes them to the
30   - * relevant liteloader handler classes. We do this rather than patching a bunch of bytecode into the packet
31   - * classes themselves because this is easier to maintain.
  29 + * Proxy class which handles the redirected calls from the injected callbacks
  30 + * and routes them to the relevant liteloader handler classes. We do this rather
  31 + * than patching a bunch of bytecode into the packet classes themselves because
  32 + * this is easier to maintain.
32 33 *
33 34 * @author Adam Mummery-Smith
34 35 */
... ... @@ -50,7 +51,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
50 51  
51 52 if (CallbackProxyClient.clientEventBroker == null)
52 53 {
53   - throw new RuntimeException("LiteLoader failed to start up properly. The game is in an unstable state and must shut down now. Check the developer log for startup errors");
  54 + throw new RuntimeException("LiteLoader failed to start up properly."
  55 + + " The game is in an unstable state and must shut down now. Check the developer log for startup errors");
54 56 }
55 57  
56 58 CallbackProxyClient.clientEventBroker.onStartupComplete();
... ... @@ -115,7 +117,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
115 117 CallbackProxyClient.clientEventBroker.postRenderHUD(partialTicks);
116 118 }
117 119  
118   - public static void IntegratedServerCtor(EventInfo<IntegratedServer> e, Minecraft minecraft, String folderName, String worldName, WorldSettings worldSettings)
  120 + public static void IntegratedServerCtor(EventInfo<IntegratedServer> e, Minecraft minecraft, String folderName, String worldName,
  121 + WorldSettings worldSettings)
119 122 {
120 123 CallbackProxyClient.clientEventBroker.onStartServer(e.getSource(), folderName, worldName, worldSettings);
121 124 }
... ... @@ -185,24 +188,27 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
185 188 CallbackProxyClient.clientEventBroker.onRenderTerrain(partialTicks, pass, timeSlice);
186 189 }
187 190  
188   - public static void onSaveScreenshot(ReturnEventInfo<ScreenShotHelper, IChatComponent> e, File gameDir, String name, int width, int height, Framebuffer fbo)
  191 + public static void onSaveScreenshot(ReturnEventInfo<ScreenShotHelper, IChatComponent> e, File gameDir, String name, int width, int height,
  192 + Framebuffer fbo)
189 193 {
190 194 CallbackProxyClient.clientEventBroker.onScreenshot(e, name, width, height, fbo);
191 195 }
192 196  
193   - public static void onRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks, boolean hideBoundingBox, Render render)
  197 + public static void onRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw,
  198 + float partialTicks, boolean hideBoundingBox, Render render)
194 199 {
195 200 CallbackProxyClient.clientEventBroker.onRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render);
196 201 }
197 202  
198   - public static void onPostRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks, boolean hideBoundingBox, Render render)
  203 + public static void onPostRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw,
  204 + float partialTicks, boolean hideBoundingBox, Render render)
199 205 {
200 206 CallbackProxyClient.clientEventBroker.onPostRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render);
201 207 }
202 208  
203 209 /**
204   - * Compatiblbe behaviour with FML, this method is called to generate a consistent offline UUID between client and server
205   - * for a given username.
  210 + * Compatiblbe behaviour with FML, this method is called to generate a
  211 + * consistent offline UUID between client and server for a given username.
206 212 */
207 213 public static void generateOfflineUUID(ReturnEventInfo<Session, GameProfile> e)
208 214 {
... ...
src/client/java/com/mumfrey/liteloader/client/ClientPluginChannelsClient.java
... ... @@ -86,7 +86,9 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
86 86 protected boolean send(String channel, PacketBuffer data, ChannelPolicy policy)
87 87 {
88 88 if (channel == null || channel.length() > 16 || CHANNEL_REGISTER.equals(channel) || CHANNEL_UNREGISTER.equals(channel))
  89 + {
89 90 throw new RuntimeException("Invalid channel name specified");
  91 + }
90 92  
91 93 if (!policy.allows(this, channel))
92 94 {
... ...
src/client/java/com/mumfrey/liteloader/client/GameEngineClient.java
... ... @@ -148,7 +148,8 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
148 148 }
149 149  
150 150 /* (non-Javadoc)
151   - * @see com.mumfrey.liteloader.common.GameEngine#setKeyBindings(java.util.List)
  151 + * @see com.mumfrey.liteloader.common.GameEngine
  152 + * #setKeyBindings(java.util.List)
152 153 */
153 154 @Override
154 155 public void setKeyBindings(List<KeyBinding> keyBindings)
... ...
src/client/java/com/mumfrey/liteloader/client/LiteLoaderCoreProviderClient.java
1 1 package com.mumfrey.liteloader.client;
2 2  
  3 +import net.minecraft.client.audio.SoundHandler;
3 4 import net.minecraft.client.resources.IResourceManager;
4 5 import net.minecraft.client.resources.IResourcePack;
5 6 import net.minecraft.client.resources.SimpleReloadableResourceManager;
... ... @@ -28,12 +29,15 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
28 29 private final LoaderProperties properties;
29 30  
30 31 /**
31   - * Read from the properties file, if true we will inhibit the sound manager reload during startup to avoid getting in trouble with OpenAL
  32 + * Read from the properties file, if true we will inhibit the sound manager
  33 + * reload during startup to avoid getting in trouble with OpenAL.
32 34 */
33 35 private boolean inhibitSoundManagerReload = true;
34 36  
35 37 /**
36   - * If inhibit is enabled, this object is used to reflectively inhibit the sound manager's reload process during startup by removing it from the reloadables list
  38 + * If inhibit is enabled, this object is used to reflectively inhibit the
  39 + * sound manager's reload process during startup by removing it from the
  40 + * reloadables list.
37 41 */
38 42 private SoundHandlerReloadInhibitor soundHandlerReloadInhibitor;
39 43  
... ... @@ -52,7 +56,9 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
52 56 @Override
53 57 public void onPostInit(GameEngine<?, ?> engine)
54 58 {
55   - this.soundHandlerReloadInhibitor = new SoundHandlerReloadInhibitor((SimpleReloadableResourceManager)engine.getResources().getResourceManager(), ((GameEngineClient)engine).getSoundHandler());
  59 + SimpleReloadableResourceManager resourceManager = (SimpleReloadableResourceManager)engine.getResources().getResourceManager();
  60 + SoundHandler soundHandler = ((GameEngineClient)engine).getSoundHandler();
  61 + this.soundHandlerReloadInhibitor = new SoundHandlerReloadInhibitor(resourceManager, soundHandler);
56 62  
57 63 if (this.inhibitSoundManagerReload)
58 64 {
... ...
src/client/java/com/mumfrey/liteloader/client/LiteLoaderEventBrokerClient.java
... ... @@ -36,7 +36,7 @@ import com.mumfrey.liteloader.transformers.event.ReturnEventInfo;
36 36 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
37 37  
38 38 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener
39   -{
  39 +{
40 40 private static LiteLoaderEventBrokerClient instance;
41 41  
42 42 /**
... ... @@ -60,8 +60,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
60 60 private boolean wasFullScreen = false;
61 61  
62 62 /**
63   - * Hash code of the current world. We don't store the world reference here because we don't want
64   - * to mess with world GC by mistake
  63 + * Hash code of the current world. We don't store the world reference
  64 + * here because we don't want to mess with world GC by mistake.
65 65 */
66 66 private int worldHashCode = 0;
67 67  
... ... @@ -76,8 +76,10 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
76 76 private FastIterableDeque<ViewportListener> viewportListeners = new HandlerList<ViewportListener>(ViewportListener.class);
77 77 private FastIterableDeque<FrameBufferListener> frameBufferListeners = new HandlerList<FrameBufferListener>(FrameBufferListener.class);
78 78 private FastIterableDeque<InitCompleteListener> initListeners = new HandlerList<InitCompleteListener>(InitCompleteListener.class);
79   - private FastIterableDeque<OutboundChatFilter> outboundChatFilters = new HandlerList<OutboundChatFilter>(OutboundChatFilter.class, ReturnLogicOp.AND);
80   - private FastIterableDeque<ScreenshotListener> screenshotListeners = new HandlerList<ScreenshotListener>(ScreenshotListener.class, ReturnLogicOp.AND_BREAK_ON_FALSE);
  79 + private FastIterableDeque<OutboundChatFilter> outboundChatFilters = new HandlerList<OutboundChatFilter>(OutboundChatFilter.class,
  80 + ReturnLogicOp.AND);
  81 + private FastIterableDeque<ScreenshotListener> screenshotListeners = new HandlerList<ScreenshotListener>(ScreenshotListener.class,
  82 + ReturnLogicOp.AND_BREAK_ON_FALSE);
81 83 private FastIterableDeque<EntityRenderListener> entityRenderListeners = new HandlerList<EntityRenderListener>(EntityRenderListener.class);
82 84  
83 85 @SuppressWarnings("cast")
... ... @@ -103,7 +105,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
103 105 }
104 106  
105 107 /* (non-Javadoc)
106   - * @see com.mumfrey.liteloader.api.InterfaceProvider#registerInterfaces(com.mumfrey.liteloader.core.InterfaceRegistrationDelegate)
  108 + * @see com.mumfrey.liteloader.api.InterfaceProvider#registerInterfaces(
  109 + * com.mumfrey.liteloader.core.InterfaceRegistrationDelegate)
107 110 */
108 111 @Override
109 112 public void registerInterfaces(InterfaceRegistrationDelegate delegate)
... ... @@ -540,7 +543,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
540 543 * @param partialTicks
541 544 * @param render
542 545 */
543   - public void onRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks, Render render)
  546 + public void onRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,
  547 + Render render)
544 548 {
545 549 this.entityRenderListeners.all().onRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
546 550 }
... ... @@ -555,7 +559,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
555 559 * @param partialTicks
556 560 * @param render
557 561 */
558   - public void onPostRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks, Render render)
  562 + public void onPostRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,
  563 + Render render)
559 564 {
560 565 this.entityRenderListeners.all().onPostRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
561 566 }
... ...
src/client/java/com/mumfrey/liteloader/client/LiteLoaderPanelManager.java
... ... @@ -41,7 +41,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
41 41 private Minecraft minecraft;
42 42  
43 43 /**
44   - * Setting which determines whether we show the "mod info" screen tab in the main menu
  44 + * Setting which determines whether we show the "mod info" screen tab in the
  45 + * main menu.
45 46 */
46 47 private boolean displayModInfoScreenTab = true;
47 48  
... ... @@ -51,8 +52,9 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
51 52 private boolean tabAlwaysExpanded = false;
52 53  
53 54 /**
54   - * Override for the "mod info" tab setting, so that mods which want to handle the mod info themselves
55   - * can temporarily disable the function without having to change the underlying property
  55 + * Override for the "mod info" tab setting, so that mods which want to
  56 + * handle the mod info themselves can temporarily disable the function
  57 + * without having to change the underlying property.
56 58 */
57 59 private boolean hideModInfoScreenTab = false;
58 60  
... ... @@ -61,8 +63,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
61 63 private String notification;
62 64  
63 65 /**
64   - * Active "mod info" screen, drawn as an overlay when in the main menu and made the active screen if
65   - * the user clicks the tab
  66 + * Active "mod info" screen, drawn as an overlay when in the main menu and
  67 + * made the active screen if the user clicks the tab.
66 68 */
67 69 private GuiLiteLoaderPanel panelHost;
68 70  
... ... @@ -114,7 +116,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
114 116 }
115 117  
116 118 /* (non-Javadoc)
117   - * @see com.mumfrey.liteloader.api.TickObserver#onTick(boolean, float, boolean)
  119 + * @see com.mumfrey.liteloader.api.TickObserver
  120 + * #onTick(boolean, float, boolean)
118 121 */
119 122 @Override
120 123 public void onTick(boolean clock, float partialTicks, boolean inGame)
... ... @@ -140,7 +143,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
140 143 }
141 144  
142 145 /* (non-Javadoc)
143   - * @see com.mumfrey.liteloader.api.PostRenderObserver#onPostRender(int, int, float)
  146 + * @see com.mumfrey.liteloader.api.PostRenderObserver
  147 + * #onPostRender(int, int, float)
144 148 */
145 149 @Override
146 150 public void onPostRender(int mouseX, int mouseY, float partialTicks)
... ... @@ -149,12 +153,14 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
149 153  
150 154 boolean tabHidden = this.isTabHidden() && this.minecraft.currentScreen instanceof GuiMainMenu;
151 155  
152   - if (this.isPanelSupportedOnScreen(this.minecraft.currentScreen) && ((this.displayModInfoScreenTab && !tabHidden) || (this.panelHost != null && this.panelHost.isOpen())))
  156 + if (this.isPanelSupportedOnScreen(this.minecraft.currentScreen)
  157 + && ((this.displayModInfoScreenTab && !tabHidden) || (this.panelHost != null && this.panelHost.isOpen())))
153 158 {
154 159 // If we're at the main menu, prepare the overlay
155 160 if (this.panelHost == null || this.panelHost.getScreen() != this.minecraft.currentScreen)
156 161 {
157   - this.panelHost = new GuiLiteLoaderPanel(this.minecraft, this.minecraft.currentScreen, this.mods, this.environment, this.properties, this.configManager, !tabHidden);
  162 + this.panelHost = new GuiLiteLoaderPanel(this.minecraft, this.minecraft.currentScreen, this.mods, this.environment, this.properties,
  163 + this.configManager, !tabHidden);
158 164 if (this.notification != null)
159 165 {
160 166 this.panelHost.setNotification(this.notification);
... ... @@ -170,14 +176,18 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
170 176 this.panelHost.release();
171 177 this.panelHost = null;
172 178 }
173   - else if (this.isPanelSupportedOnScreen(this.minecraft.currentScreen) && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && Keyboard.isKeyDown(Keyboard.KEY_TAB))
  179 + else if (this.isPanelSupportedOnScreen(this.minecraft.currentScreen)
  180 + && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)
  181 + && Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)
  182 + && Keyboard.isKeyDown(Keyboard.KEY_TAB))
174 183 {
175 184 this.displayLiteLoaderPanel(this.minecraft.currentScreen);
176 185 }
177 186 }
178 187  
179 188 /**
180   - * Set the "mod info" screen tab to hidden, regardless of the property setting
  189 + * Set the "mod info" screen tab to hidden, regardless of the property
  190 + * setting.
181 191 */
182 192 @Override
183 193 public void hideTab()
... ... @@ -247,7 +257,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
247 257 {
248 258 if (this.isPanelSupportedOnScreen(parentScreen))
249 259 {
250   - this.panelHost = new GuiLiteLoaderPanel(this.minecraft, parentScreen, this.mods, this.environment, this.properties, this.configManager, !this.isTabHidden());
  260 + this.panelHost = new GuiLiteLoaderPanel(this.minecraft, parentScreen, this.mods, this.environment, this.properties,
  261 + this.configManager, !this.isTabHidden());
251 262 this.minecraft.displayGuiScreen(this.panelHost);
252 263 }
253 264 }
... ...
src/client/java/com/mumfrey/liteloader/client/PacketEventsClient.java
... ... @@ -45,11 +45,13 @@ public class PacketEventsClient extends PacketEvents
45 45 {
46 46 private static RealmsServer joiningRealm;
47 47  
48   - private FastIterableDeque<JoinGameListener> joinGameListeners = new HandlerList<JoinGameListener>(JoinGameListener.class);
49   - private FastIterableDeque<ChatListener> chatListeners = new HandlerList<ChatListener>(ChatListener.class);
50   - private FastIterableDeque<ChatFilter> chatFilters = new HandlerList<ChatFilter>(ChatFilter.class, ReturnLogicOp.AND_BREAK_ON_FALSE);
51   - private FastIterableDeque<PreJoinGameListener> preJoinGameListeners = new HandlerList<PreJoinGameListener>(PreJoinGameListener.class, ReturnLogicOp.AND_BREAK_ON_FALSE);
52   - private FastIterableDeque<PostLoginListener> postLoginListeners = new HandlerList<PostLoginListener>(PostLoginListener.class);
  48 + private FastIterableDeque<JoinGameListener> joinGameListeners = new HandlerList<JoinGameListener>(JoinGameListener.class);
  49 + private FastIterableDeque<ChatListener> chatListeners = new HandlerList<ChatListener>(ChatListener.class);
  50 + private FastIterableDeque<ChatFilter> chatFilters = new HandlerList<ChatFilter>(ChatFilter.class,
  51 + ReturnLogicOp.AND_BREAK_ON_FALSE);
  52 + private FastIterableDeque<PreJoinGameListener> preJoinGameListeners = new HandlerList<PreJoinGameListener>(PreJoinGameListener.class,
  53 + ReturnLogicOp.AND_BREAK_ON_FALSE);
  54 + private FastIterableDeque<PostLoginListener> postLoginListeners = new HandlerList<PostLoginListener>(PostLoginListener.class);
53 55  
54 56 @Override
55 57 public void registerInterfaces(InterfaceRegistrationDelegate delegate)
... ... @@ -86,7 +88,8 @@ public class PacketEventsClient extends PacketEvents
86 88 {
87 89 if (chatListener instanceof ChatFilter)
88 90 {
89   - LiteLoaderLogger.warning("Interface error initialising mod '%1s'. A mod implementing ChatFilter and ChatListener is not supported! Remove one of these interfaces", chatListener.getName());
  91 + LiteLoaderLogger.warning("Interface error initialising mod '%1s'. A mod implementing ChatFilter and ChatListener is not supported! "
  92 + + "Remove one of these interfaces", chatListener.getName());
90 93 }
91 94 else
92 95 {
... ... @@ -127,7 +130,10 @@ public class PacketEventsClient extends PacketEvents
127 130 }
128 131  
129 132 /* (non-Javadoc)
130   - * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(com.mumfrey.liteloader.common.transformers.PacketEventInfo, net.minecraft.network.INetHandler, net.minecraft.network.play.server.S01PacketJoinGame)
  133 + * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(
  134 + * com.mumfrey.liteloader.common.transformers.PacketEventInfo,
  135 + * net.minecraft.network.INetHandler,
  136 + * net.minecraft.network.play.server.S01PacketJoinGame)
131 137 */
132 138 @Override
133 139 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet)
... ... @@ -179,7 +185,10 @@ public class PacketEventsClient extends PacketEvents
179 185 }
180 186  
181 187 /* (non-Javadoc)
182   - * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(com.mumfrey.liteloader.common.transformers.PacketEventInfo, net.minecraft.network.INetHandler, net.minecraft.network.login.server.S02PacketLoginSuccess)
  188 + * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(
  189 + * com.mumfrey.liteloader.common.transformers.PacketEventInfo,
  190 + * net.minecraft.network.INetHandler,
  191 + * net.minecraft.network.login.server.S02PacketLoginSuccess)
183 192 */
184 193 @Override
185 194 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet)
... ... @@ -199,13 +208,18 @@ public class PacketEventsClient extends PacketEvents
199 208 }
200 209  
201 210 /* (non-Javadoc)
202   - * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(com.mumfrey.liteloader.common.transformers.PacketEventInfo, net.minecraft.network.INetHandler, net.minecraft.network.play.server.S02PacketChat)
  211 + * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(
  212 + * com.mumfrey.liteloader.common.transformers.PacketEventInfo,
  213 + * net.minecraft.network.INetHandler,
  214 + * net.minecraft.network.play.server.S02PacketChat)
203 215 */
204 216 @Override
205 217 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet)
206 218 {
207 219 if (packet.getChatComponent() == null)
  220 + {
208 221 return;
  222 + }
209 223  
210 224 IChatComponent originalChat = packet.getChatComponent();
211 225 IChatComponent chat = originalChat;
... ...
src/client/java/com/mumfrey/liteloader/client/ResourceObserver.java
... ... @@ -50,7 +50,8 @@ public class ResourceObserver implements ModLoadObserver
50 50 {
51 51 LiteLoaderLogger.info("Adding \"%s\" to active resource pack set", container.getLocation());
52 52 IResourcePack resourcePack = this.initResourcePack(container, modName);
53   - Resources<IResourceManager, IResourcePack> resources = (Resources<IResourceManager, IResourcePack>)LiteLoader.getGameEngine().getResources();
  53 + Resources<IResourceManager, IResourcePack> resources
  54 + = (Resources<IResourceManager, IResourcePack>)LiteLoader.getGameEngine().getResources();
54 55 if (resources.registerResourcePack(resourcePack))
55 56 {
56 57 LiteLoaderLogger.info("Successfully added \"%s\" to active resource pack set", container.getLocation());
... ... @@ -66,7 +67,8 @@ public class ResourceObserver implements ModLoadObserver
66 67 {
67 68 if (container.isDirectory())
68 69 {
69   - LiteLoaderLogger.info("Setting up \"%s/%s\" as mod resource pack with identifier \"%s\"", container.toFile().getParentFile().getName(), container.getName(), name);
  70 + LiteLoaderLogger.info("Setting up \"%s/%s\" as mod resource pack with identifier \"%s\"",
  71 + container.toFile().getParentFile().getName(), container.getName(), name);
70 72 resourcePack = new ModResourcePackDir(name, container.toFile());
71 73 }
72 74 else
... ...
src/client/java/com/mumfrey/liteloader/client/ResourcesClient.java
... ... @@ -22,7 +22,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
22 22 private final Map<String, IResourcePack> registeredResourcePacks = new HashMap<String, IResourcePack>();
23 23  
24 24 /**
25   - * True while initialising mods if we need to do a resource manager reload once the process is completed
  25 + * True while initialising mods if we need to do a resource manager reload
  26 + * once the process is completed.
26 27 */
27 28 private boolean pendingResourceReload;
28 29  
... ... @@ -50,7 +51,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
50 51 }
51 52  
52 53 /* (non-Javadoc)
53   - * @see com.mumfrey.liteloader.common.GameEngine#registerResourcePack(net.minecraft.client.resources.IResourcePack)
  54 + * @see com.mumfrey.liteloader.common.GameEngine#registerResourcePack(
  55 + * net.minecraft.client.resources.IResourcePack)
54 56 */
55 57 @Override
56 58 public boolean registerResourcePack(IResourcePack resourcePack)
... ... @@ -72,7 +74,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
72 74 }
73 75  
74 76 /* (non-Javadoc)
75   - * @see com.mumfrey.liteloader.common.GameEngine#unRegisterResourcePack(net.minecraft.client.resources.IResourcePack)
  77 + * @see com.mumfrey.liteloader.common.GameEngine#unRegisterResourcePack(
  78 + * net.minecraft.client.resources.IResourcePack)
76 79 */
77 80 @Override
78 81 public boolean unRegisterResourcePack(IResourcePack resourcePack)
... ...
src/client/java/com/mumfrey/liteloader/client/SoundHandlerReloadInhibitor.java
... ... @@ -10,7 +10,8 @@ import com.mumfrey.liteloader.client.util.PrivateFieldsClient;
10 10 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
11 11  
12 12 /**
13   - * Manager object which handles inhibiting the sound handler's reload notification at startup
  13 + * Manager object which handles inhibiting the sound handler's reload
  14 + * notification at startup.
14 15 *
15 16 * @author Adam Mummery-Smith
16 17 */
... ... @@ -32,7 +33,8 @@ public class SoundHandlerReloadInhibitor
32 33 private boolean inhibited;
33 34  
34 35 /**
35   - * So that we can re-insert the sound manager at the same index, we store the index we remove it from
  36 + * So that we can re-insert the sound manager at the same index, we store
  37 + * the index we remove it from.
36 38 */
37 39 private int storedIndex;
38 40  
... ...
src/client/java/com/mumfrey/liteloader/client/Translator.java
... ... @@ -7,7 +7,8 @@ import com.mumfrey.liteloader.api.TranslationProvider;
7 7 public class Translator implements TranslationProvider
8 8 {
9 9 /* (non-Javadoc)
10   - * @see com.mumfrey.liteloader.api.TranslationProvider#translate(java.lang.String, java.lang.Object[])
  10 + * @see com.mumfrey.liteloader.api.TranslationProvider#translate(
  11 + * java.lang.String, java.lang.Object[])
11 12 */
12 13 @Override
13 14 public String translate(String key, Object... args)
... ... @@ -17,7 +18,8 @@ public class Translator implements TranslationProvider
17 18 }
18 19  
19 20 /* (non-Javadoc)
20   - * @see com.mumfrey.liteloader.api.TranslationProvider#translate(java.lang.String, java.lang.String, java.lang.Object[])
  21 + * @see com.mumfrey.liteloader.api.TranslationProvider#translate(
  22 + * java.lang.String, java.lang.String, java.lang.Object[])
21 23 */
22 24 @Override
23 25 public String translate(String locale, String key, Object... args)
... ...
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderBrandingProvider.java
... ... @@ -20,9 +20,13 @@ public class LiteLoaderBrandingProvider implements BrandingProvider
20 20 public static final int BRANDING_COLOUR = 0xFF4785D1;
21 21  
22 22 public static final ResourceLocation ABOUT_TEXTURE = new ResourceLocation("liteloader", "textures/gui/about.png");
23   - public static final IconAbsolute LOGO_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, "logo", 128, 40, 0, 0, 256, 80);
24   - public static final IconAbsolute ICON_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, "chicken", 32, 45, 0, 80, 64, 170);
25   - public static final IconAbsolute TWITTER_AVATAR_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, "twitter_avatar", 32, 32, 192, 80, 256, 144);
  23 +
  24 + public static final IconAbsolute LOGO_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  25 + "logo", 128, 40, 0, 0, 256, 80);
  26 + public static final IconAbsolute ICON_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  27 + "chicken", 32, 45, 0, 80, 64, 170);
  28 + public static final IconAbsolute TWITTER_AVATAR_COORDS = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  29 + "twitter_avatar",32, 32, 192, 80, 256, 144);
26 30  
27 31 public static final URI LITELOADER_URI = URI.create("http://www.liteloader.com/");
28 32  
... ... @@ -117,7 +121,8 @@ public class LiteLoaderBrandingProvider implements BrandingProvider
117 121 }
118 122  
119 123 /* (non-Javadoc)
120   - * @see com.mumfrey.liteloader.api.BrandingProvider#getTwitterAvatarResource()
  124 + * @see com.mumfrey.liteloader.api.BrandingProvider
  125 + * #getTwitterAvatarResource()
121 126 */
122 127 @Override
123 128 public ResourceLocation getTwitterAvatarResource()
... ...
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderCoreAPIClient.java
... ... @@ -53,7 +53,8 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI
53 53 }
54 54  
55 55 /* (non-Javadoc)
56   - * @see com.mumfrey.liteloader.api.LiteAPI#getRequiredDownstreamTransformers()
  56 + * @see com.mumfrey.liteloader.api.LiteAPI
  57 + * #getRequiredDownstreamTransformers()
57 58 */
58 59 @Override
59 60 public String[] getRequiredDownstreamTransformers()
... ... @@ -144,7 +145,7 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI
144 145 if (this.objectFactory == null)
145 146 {
146 147 this.objectFactory = new ObjectFactoryClient(this.environment, this.properties);
147   - }
  148 + }
148 149  
149 150 return this.objectFactory;
150 151 }
... ...
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderModInfoDecorator.java
... ... @@ -20,14 +20,17 @@ import com.mumfrey.liteloader.util.render.IconTextured;
20 20 public class LiteLoaderModInfoDecorator implements ModInfoDecorator
21 21 {
22 22 /* (non-Javadoc)
23   - * @see com.mumfrey.liteloader.api.ModInfoDecorator#addIcons(com.mumfrey.liteloader.core.ModInfo, java.util.List)
  23 + * @see com.mumfrey.liteloader.api.ModInfoDecorator
  24 + * #addIcons(com.mumfrey.liteloader.core.ModInfo, java.util.List)
24 25 */
25 26 @Override
26 27 public void addIcons(final ModInfo<?> mod, List<IconTextured> icons)
27 28 {
28 29 if (mod.hasTweakClass())
29 30 {
30   - icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE, I18n.format("gui.mod.providestweak"), 12, 12, 158, 80, 170, 92){
  31 + icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  32 + I18n.format("gui.mod.providestweak"), 12, 12, 158, 80, 170, 92)
  33 + {
31 34 @Override
32 35 public void onClicked(Object source, Object container)
33 36 {
... ... @@ -41,7 +44,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
41 44  
42 45 if (mod.hasEventTransformers())
43 46 {
44   - icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE, I18n.format("gui.mod.providesevents"), 12, 12, 170, 92, 182, 104){
  47 + icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  48 + I18n.format("gui.mod.providesevents"), 12, 12, 170, 92, 182, 104)
  49 + {
45 50 @Override
46 51 public void onClicked(Object source, Object container)
47 52 {
... ... @@ -55,7 +60,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
55 60  
56 61 if (mod.hasClassTransformers())
57 62 {
58   - icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE, I18n.format("gui.mod.providestransformer"), 12, 12, 170, 80, 182, 92){
  63 + icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  64 + I18n.format("gui.mod.providestransformer"), 12, 12, 170, 80, 182, 92)
  65 + {
59 66 @Override
60 67 public void onClicked(Object source, Object container)
61 68 {
... ... @@ -69,13 +76,16 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
69 76  
70 77 if (mod.usesAPI())
71 78 {
72   - icons.add(new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, I18n.format("gui.mod.usingapi"), 12, 12, 122, 92, 134, 104));
  79 + icons.add(new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  80 + I18n.format("gui.mod.usingapi"), 12, 12, 122, 92, 134, 104));
73 81 }
74 82  
75 83 List<Throwable> startupErrors = mod.getStartupErrors();
76 84 if (startupErrors != null && startupErrors.size() > 0)
77 85 {
78   - icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE, I18n.format("gui.mod.startuperror", startupErrors.size()), 12, 12, 134, 92, 146, 104){
  86 + icons.add(new IconAbsoluteClickable(LiteLoaderBrandingProvider.ABOUT_TEXTURE,
  87 + I18n.format("gui.mod.startuperror", startupErrors.size()), 12, 12, 134, 92, 146, 104)
  88 + {
79 89 @Override
80 90 public void onClicked(Object source, Object container)
81 91 {
... ... @@ -89,7 +99,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
89 99 }
90 100  
91 101 /* (non-Javadoc)
92   - * @see com.mumfrey.liteloader.api.ModInfoDecorator#modifyStatusText(com.mumfrey.liteloader.core.ModInfo, java.lang.String)
  102 + * @see com.mumfrey.liteloader.api.ModInfoDecorator
  103 + * #modifyStatusText(com.mumfrey.liteloader.core.ModInfo,
  104 + * java.lang.String)
93 105 */
94 106 @Override
95 107 public String modifyStatusText(ModInfo<?> mod, String statusText)
... ... @@ -98,10 +110,13 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
98 110 }
99 111  
100 112 /* (non-Javadoc)
101   - * @see com.mumfrey.liteloader.api.ModInfoDecorator#onDrawListEntry(int, int, float, int, int, int, int, boolean, com.mumfrey.liteloader.core.ModInfo, int, int, int)
  113 + * @see com.mumfrey.liteloader.api.ModInfoDecorator
  114 + * #onDrawListEntry(int, int, float, int, int, int, int, boolean,
  115 + * com.mumfrey.liteloader.core.ModInfo, int, int, int)
102 116 */
103 117 @Override
104   - public void onDrawListEntry(int mouseX, int mouseY, float partialTicks, int xPosition, int yPosition, int width, int height, boolean selected, ModInfo<?> mod, int gradientColour, int titleColour, int statusColour)
  118 + public void onDrawListEntry(int mouseX, int mouseY, float partialTicks, int xPosition, int yPosition, int width, int height, boolean selected,
  119 + ModInfo<?> mod, int gradientColour, int titleColour, int statusColour)
105 120 {
106 121 }
107 122 }
... ...
src/client/java/com/mumfrey/liteloader/client/api/ObjectFactoryClient.java
... ... @@ -96,7 +96,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
96 96 if (this.engine == null)
97 97 {
98 98 this.engine = new GameEngineClient();
99   - }
  99 + }
100 100  
101 101 return this.engine;
102 102 }
... ... @@ -118,7 +118,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
118 118 if (this.clientPluginChannels == null)
119 119 {
120 120 this.clientPluginChannels = new ClientPluginChannelsClient();
121   - }
  121 + }
122 122  
123 123 return this.clientPluginChannels;
124 124 }
... ... @@ -129,7 +129,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
129 129 if (this.serverPluginChannels == null)
130 130 {
131 131 this.serverPluginChannels = new ServerPluginChannels();
132   - }
  132 + }
133 133  
134 134 return this.serverPluginChannels;
135 135 }
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiCheckbox.java
... ... @@ -27,14 +27,23 @@ public class GuiCheckbox extends GuiButton
27 27 {
28 28 minecraft.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE);
29 29 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
30   - this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
  30 + this.hovered = mouseX >= this.xPosition
  31 + && mouseY >= this.yPosition
  32 + && mouseX < this.xPosition + this.width
  33 + && mouseY < this.yPosition + this.height;
31 34  
32 35 this.drawTexturedModalRect(this.xPosition, this.yPosition, this.checked ? 134 : 122, 80, 12, 12);
33 36 this.mouseDragged(minecraft, mouseX, mouseY);
34 37  
35 38 int colour = 0xE0E0E0;
36   - if (!this.enabled) colour = 0xA0A0A0;
37   - else if (this.hovered) colour = 0xFFFFA0;
  39 + if (!this.enabled)
  40 + {
  41 + colour = 0xA0A0A0;
  42 + }
  43 + else if (this.hovered)
  44 + {
  45 + colour = 0xFFFFA0;
  46 + }
38 47  
39 48 this.drawString(minecraft.fontRendererObj, this.displayString, this.xPosition + 16, this.yPosition + 2, colour);
40 49 }
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiHoverLabel.java
... ... @@ -36,7 +36,10 @@ public class GuiHoverLabel extends GuiButton
36 36 {
37 37 if (this.visible)
38 38 {
39   - this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
  39 + this.hovered = mouseX >= this.xPosition
  40 + && mouseY >= this.yPosition
  41 + && mouseX < this.xPosition + this.width
  42 + && mouseY < this.yPosition + this.height;
40 43 this.fontRenderer.drawString(this.displayString, this.xPosition, this.yPosition, this.hovered ? this.hoverColour : this.colour);
41 44 }
42 45 else
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiLiteLoaderPanel.java
... ... @@ -36,30 +36,45 @@ import com.mumfrey.liteloader.modconfig.ConfigPanel;
36 36 import com.mumfrey.liteloader.util.render.Icon;
37 37  
38 38 /**
39   - * GUI screen which displays info about loaded mods and also allows them to be enabled and
40   - * disabled. An instance of this class is created every time the main menu is displayed and is
41   - * drawn as an overlay until the tab is clicked, at which point it becomes the active GUI screen
42   - * and draws the parent main menu screen as its background to give the appearance of being
43   - * overlaid on the main menu.
  39 + * GUI screen which displays info about loaded mods and also allows them to be
  40 + * enabled and disabled. An instance of this class is created every time the
  41 + * main menu is displayed and is drawn as an overlay until the tab is clicked,
  42 + * at which point it becomes the active GUI screen and draws the parent main
  43 + * menu screen as its background to give the appearance of being overlaid on the
  44 + * main menu.
44 45 *
45 46 * @author Adam Mummery-Smith
46 47 */
47 48 public class GuiLiteLoaderPanel extends GuiScreen
48 49 {
49   - static final int LEFT_EDGE = 80;
50   - static final int MARGIN = 12;
51   - static final int TAB_WIDTH = 20;
52   - static final int TAB_HEIGHT = 40;
53   - static final int TAB_TOP = 20;
54   - static final int PANEL_TOP = 83;
55   - static final int PANEL_BOTTOM = 26;
  50 + static final int WHITE = 0xFFFFFFFF;
  51 + static final int OPAQUE = 0xFF000000;
  52 + static final int NOTIFICATION_TOOLTIP_FOREGROUND = 0xFFFFFF;
  53 + static final int NOTIFICATION_TOOLTIP_BACKGROUND = 0xB0000099;
  54 + static final int ERROR_TOOLTIP_FOREGROUND = 0xFF5555;
  55 + static final int ERROR_TOOLTIP_BACKGROUND = 0xB0330000;
  56 + static final int HEADER_HR_COLOUR = 0xFF999999;
  57 + static final int HEADER_TEXT_COLOUR = GuiLiteLoaderPanel.WHITE;
  58 + static final int HEADER_TEXT_COLOUR_SUB = 0xFFAAAAAA;
  59 + static final int TOOLTIP_FOREGROUND = 0xFFFFFF;
  60 + static final int TOOLTIP_FOREGROUND_SUB = 0xCCCCCC;
  61 + static final int TOOLTIP_BACKGROUND = 0xB0000000;
  62 +
  63 + static final int LEFT_EDGE = 80;
  64 + static final int MARGIN = 12;
  65 + static final int TAB_WIDTH = 20;
  66 + static final int TAB_HEIGHT = 40;
  67 + static final int TAB_TOP = 20;
  68 + static final int PANEL_TOP = 83;
  69 + static final int PANEL_BOTTOM = 26;
56 70  
57 71 private static final double TWEEN_RATE = 0.08;
58 72  
59 73 private static boolean displayErrorToolTip = true;
60 74  
61 75 /**
62   - * Reference to the main menu which this screen is either overlaying or using as its background
  76 + * Reference to the main menu which this screen is either overlaying or
  77 + * using as its background.
63 78 */
64 79 private GuiScreen parentScreen;
65 80  
... ... @@ -84,7 +99,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
84 99 private double tweenAmount = 0.0;
85 100  
86 101 /**
87   - * Since we don't get real mouse events we have to simulate them by tracking the mouse state
  102 + * Since we don't get real mouse events we have to simulate them by tracking
  103 + * the mouse state.
88 104 */
89 105 private boolean mouseDown, toggled, toggleable;
90 106  
... ... @@ -131,7 +147,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
131 147 * @param parentScreen
132 148 * @param mods
133 149 */
134   - public GuiLiteLoaderPanel(Minecraft minecraft, GuiScreen parentScreen, LiteLoaderMods mods, LoaderEnvironment environment, LoaderProperties properties, ConfigManager configManager, boolean showTab)
  150 + public GuiLiteLoaderPanel(Minecraft minecraft, GuiScreen parentScreen, LiteLoaderMods mods, LoaderEnvironment environment,
  151 + LoaderProperties properties, ConfigManager configManager, boolean showTab)
135 152 {
136 153 this.mc = minecraft;
137 154 this.fontRendererObj = minecraft.fontRendererObj;
... ... @@ -148,7 +165,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
148 165  
149 166 this.initBranding();
150 167  
151   - this.currentPanel = this.modsPanel = new GuiPanelMods(this, minecraft, mods, environment, configManager, this.brandColour, this.modInfoDecorators);
  168 + this.currentPanel = this.modsPanel = new GuiPanelMods(this, minecraft, mods, environment, configManager,
  169 + this.brandColour, this.modInfoDecorators);
152 170 this.settingsPanel = new GuiPanelSettings(this, minecraft);
153 171  
154 172 this.startupErrorCount = mods.getStartupErrorCount();
... ... @@ -181,7 +199,7 @@ public class GuiLiteLoaderPanel extends GuiScreen
181 199 if (brandingProvider.getBrandingColour() != 0 && brandingProvider.getPriority() > brandingColourProviderPriority)
182 200 {
183 201 brandingColourProviderPriority = brandingProvider.getPriority();
184   - this.brandColour = 0xFF000000 | brandingProvider.getBrandingColour();
  202 + this.brandColour = GuiLiteLoaderPanel.OPAQUE | brandingProvider.getBrandingColour();
185 203 }
186 204  
187 205 ResourceLocation logoResource = brandingProvider.getLogoResource();
... ... @@ -271,11 +289,13 @@ public class GuiLiteLoaderPanel extends GuiScreen
271 289  
272 290 this.currentPanel.setSize(this.width - LEFT_EDGE, this.height);
273 291  
274   - this.buttonList.add(new GuiHoverLabel(2, LEFT_EDGE + MARGIN, this.height - PANEL_BOTTOM + 9, this.fontRendererObj, I18n.format("gui.about.taboptions"), this.brandColour));
  292 + this.buttonList.add(new GuiHoverLabel(2, LEFT_EDGE + MARGIN, this.height - PANEL_BOTTOM + 9, this.fontRendererObj,
  293 + I18n.format("gui.about.taboptions"), this.brandColour));
275 294  
276 295 if (LiteLoaderVersion.getUpdateSite().canCheckForUpdate() && this.mc.theWorld == null && !this.isSnapshot)
277 296 {
278   - this.buttonList.add(new GuiHoverLabel(3, LEFT_EDGE + MARGIN + 38 + this.fontRendererObj.getStringWidth(this.versionText) + 6, 50, this.fontRendererObj, I18n.format("gui.about.checkupdates"), this.brandColour));
  297 + this.buttonList.add(new GuiHoverLabel(3, LEFT_EDGE + MARGIN + 38 + this.fontRendererObj.getStringWidth(this.versionText) + 6, 50,
  298 + this.fontRendererObj, I18n.format("gui.about.checkupdates"), this.brandColour));
279 299 }
280 300  
281 301 Keyboard.enableRepeatEvents(true);
... ... @@ -288,7 +308,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
288 308 }
289 309  
290 310 /* (non-Javadoc)
291   - * @see net.minecraft.client.gui.GuiScreen#setWorldAndResolution(net.minecraft.client.Minecraft, int, int)
  311 + * @see net.minecraft.client.gui.GuiScreen
  312 + * #setWorldAndResolution(net.minecraft.client.Minecraft, int, int)
292 313 */
293 314 @Override
294 315 public void setWorldAndResolution(Minecraft minecraft, int width, int height)
... ... @@ -363,11 +384,15 @@ public class GuiLiteLoaderPanel extends GuiScreen
363 384 int offsetMouseX = mouseX - (int)xOffset;
364 385  
365 386 // Handle mouse stuff here since we won't get mouse events when not the active GUI
366   - boolean mouseOverTab = this.showTab && (offsetMouseX > LEFT_EDGE - TAB_WIDTH && offsetMouseX < LEFT_EDGE && mouseY > TAB_TOP && mouseY < TAB_TOP + TAB_HEIGHT);
  387 + boolean mouseOverTab = this.showTab && (offsetMouseX > LEFT_EDGE - TAB_WIDTH
  388 + && offsetMouseX < LEFT_EDGE
  389 + && mouseY > TAB_TOP
  390 + && mouseY < TAB_TOP + TAB_HEIGHT);
367 391 this.handleMouseClick(offsetMouseX, mouseY, partialTicks, active, mouseOverTab);
368 392  
369 393 // Calculate the tab opacity, not framerate adjusted because we don't really care
370   - this.tabOpacity = mouseOverTab || alwaysExpandTab || this.startupErrorCount > 0 || this.notification != null || this.isOpen() ? 0.5F : Math.max(0.0F, this.tabOpacity - partialTicks * 0.1F);
  394 + this.tabOpacity = mouseOverTab || alwaysExpandTab || this.startupErrorCount > 0 || this.notification != null
  395 + || this.isOpen() ? 0.5F : Math.max(0.0F, this.tabOpacity - partialTicks * 0.1F);
371 396  
372 397 // Draw the panel contents
373 398 this.drawPanel(offsetMouseX, mouseY, partialTicks, active, xOffset);
... ... @@ -391,12 +416,12 @@ public class GuiLiteLoaderPanel extends GuiScreen
391 416 glTranslatef(xOffset, 0.0F, 0.0F);
392 417  
393 418 // Draw the background and left edge
394   - drawRect(LEFT_EDGE, 0, this.width, this.height, 0xB0000000);
  419 + drawRect(LEFT_EDGE, 0, this.width, this.height, GuiLiteLoaderPanel.TOOLTIP_BACKGROUND);
395 420  
396 421 if (this.showTab)
397 422 {
398   - drawRect(LEFT_EDGE, 0, LEFT_EDGE + 1, TAB_TOP, 0xFFFFFFFF);
399   - drawRect(LEFT_EDGE, TAB_TOP + TAB_HEIGHT, LEFT_EDGE + 1, this.height, 0xFFFFFFFF);
  423 + drawRect(LEFT_EDGE, 0, LEFT_EDGE + 1, TAB_TOP, GuiLiteLoaderPanel.WHITE);
  424 + drawRect(LEFT_EDGE, TAB_TOP + TAB_HEIGHT, LEFT_EDGE + 1, this.height, GuiLiteLoaderPanel.WHITE);
400 425  
401 426 this.mc.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE);
402 427 glDrawTexturedRect(LEFT_EDGE - TAB_WIDTH, TAB_TOP, TAB_WIDTH + 1, TAB_HEIGHT, 80, 80, 122, 160, 0.5F + this.tabOpacity);
... ... @@ -411,7 +436,7 @@ public class GuiLiteLoaderPanel extends GuiScreen
411 436 }
412 437 else
413 438 {
414   - drawRect(LEFT_EDGE, 0, LEFT_EDGE + 1, this.height, 0xFFFFFFFF);
  439 + drawRect(LEFT_EDGE, 0, LEFT_EDGE + 1, this.height, GuiLiteLoaderPanel.WHITE);
415 440 }
416 441  
417 442 // Only draw the panel contents if we are actually open
... ... @@ -470,14 +495,15 @@ public class GuiLiteLoaderPanel extends GuiScreen
470 495 glDrawTexturedRect(right - this.iconCoords.getIconWidth(), MARGIN, this.iconCoords, 1.0F);
471 496  
472 497 // Draw header text
473   - this.fontRendererObj.drawString(this.versionText, left + 38, 50, 0xFFFFFFFF);
474   - this.fontRendererObj.drawString(this.activeModText, left + 38, 60, 0xFFAAAAAA);
  498 + this.fontRendererObj.drawString(this.versionText, left + 38, 50, GuiLiteLoaderPanel.HEADER_TEXT_COLOUR);
  499 + this.fontRendererObj.drawString(this.activeModText, left + 38, 60, GuiLiteLoaderPanel.HEADER_TEXT_COLOUR_SUB);
475 500  
476 501 // Draw top and bottom horizontal rules
477   - drawRect(left, 80, right, 81, 0xFF999999);
478   - drawRect(left, this.height - bottom + 2, right, this.height - bottom + 3, 0xFF999999);
  502 + drawRect(left, 80, right, 81, GuiLiteLoaderPanel.HEADER_HR_COLOUR);
  503 + drawRect(left, this.height - bottom + 2, right, this.height - bottom + 3, GuiLiteLoaderPanel.HEADER_HR_COLOUR);
479 504  
480   - this.mouseOverLogo = (mouseY > MARGIN && mouseY < MARGIN + this.logoCoords.getIconHeight() && mouseX > left && mouseX < left + this.logoCoords.getIconWidth());
  505 + this.mouseOverLogo = (mouseY > MARGIN && mouseY < MARGIN + this.logoCoords.getIconHeight()
  506 + && mouseX > left && mouseX < left + this.logoCoords.getIconWidth());
481 507 return this.mouseOverLogo;
482 508 }
483 509  
... ... @@ -487,8 +513,10 @@ public class GuiLiteLoaderPanel extends GuiScreen
487 513  
488 514 if (mouseOverTab && this.tweenAmount < 0.01)
489 515 {
490   - GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, LiteLoader.getVersionDisplayString(), mouseX, mouseY, this.width, this.height, 0xFFFFFF, 0xB0000000);
491   - GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, this.activeModText, mouseX, mouseY + 13, this.width, this.height, 0xCCCCCC, 0xB0000000);
  516 + GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, LiteLoader.getVersionDisplayString(), mouseX, mouseY, this.width, this.height,
  517 + GuiLiteLoaderPanel.TOOLTIP_FOREGROUND, GuiLiteLoaderPanel.TOOLTIP_BACKGROUND);
  518 + GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, this.activeModText, mouseX, mouseY + 13, this.width, this.height,
  519 + GuiLiteLoaderPanel.TOOLTIP_FOREGROUND_SUB, GuiLiteLoaderPanel.TOOLTIP_BACKGROUND);
492 520  
493 521 if (annoyingTip)
494 522 {
... ... @@ -505,16 +533,19 @@ public class GuiLiteLoaderPanel extends GuiScreen
505 533 {
506 534 if (this.startupErrorCount > 0)
507 535 {
508   - GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, I18n.format("gui.error.tooltip", this.startupErrorCount, this.criticalErrorCount), left, top, this.width, this.height, 0xFF5555, 0xB0330000);
  536 + GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, I18n.format("gui.error.tooltip", this.startupErrorCount, this.criticalErrorCount),
  537 + left, top, this.width, this.height, GuiLiteLoaderPanel.ERROR_TOOLTIP_FOREGROUND, GuiLiteLoaderPanel.ERROR_TOOLTIP_BACKGROUND);
509 538 }
510 539 else if (this.notification != null)
511 540 {
512   - GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, this.notification, left, top, this.width, this.height, 0xFFFFFF, 0xB0000099);
  541 + GuiLiteLoaderPanel.drawTooltip(this.fontRendererObj, this.notification, left, top, this.width, this.height,
  542 + GuiLiteLoaderPanel.NOTIFICATION_TOOLTIP_FOREGROUND, GuiLiteLoaderPanel.NOTIFICATION_TOOLTIP_BACKGROUND);
513 543 }
514 544 }
515 545  
516 546 /* (non-Javadoc)
517   - * @see net.minecraft.client.gui.GuiScreen#actionPerformed(net.minecraft.client.gui.GuiButton)
  547 + * @see net.minecraft.client.gui.GuiScreen
  548 + * #actionPerformed(net.minecraft.client.gui.GuiButton)
518 549 */
519 550 @Override
520 551 protected void actionPerformed(GuiButton button)
... ... @@ -586,9 +617,13 @@ public class GuiLiteLoaderPanel extends GuiScreen
586 617 protected void mouseReleased(int mouseX, int mouseY, int button)
587 618 {
588 619 if (button == -1)
  620 + {
589 621 this.currentPanel.mouseMoved(mouseX - LEFT_EDGE, mouseY);
  622 + }
590 623 else
  624 + {
591 625 this.currentPanel.mouseReleased(mouseX - LEFT_EDGE, mouseY, button);
  626 + }
592 627  
593 628 if (!this.currentPanel.stealFocus())
594 629 {
... ... @@ -661,7 +696,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
661 696 }
662 697  
663 698 /**
664   - * Callback for the "config" button, display the config panel for the currently selected mod
  699 + * Callback for the "config" button, display the config panel for the
  700 + * currently selected mod.
665 701 */
666 702 void openConfigPanel(ConfigPanel panel, LiteMod mod)
667 703 {
... ... @@ -694,7 +730,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
694 730 }
695 731  
696 732 /**
697   - * Draw a tooltip at the specified location and clip to screenWidth and screenHeight
  733 + * Draw a tooltip at the specified location and clip to screenWidth and
  734 + * screenHeight
698 735 *
699 736 * @param fontRenderer
700 737 * @param tooltipText
... ... @@ -705,13 +742,14 @@ public class GuiLiteLoaderPanel extends GuiScreen
705 742 * @param colour
706 743 * @param backgroundColour
707 744 */
708   - public static void drawTooltip(FontRenderer fontRenderer, String tooltipText, int mouseX, int mouseY, int screenWidth, int screenHeight, int colour, int backgroundColour)
  745 + public static void drawTooltip(FontRenderer fontRenderer, String tooltipText, int mouseX, int mouseY, int screenWidth, int screenHeight,
  746 + int colour, int backgroundColour)
709 747 {
710 748 int textSize = fontRenderer.getStringWidth(tooltipText);
711 749 mouseX = Math.max(0, Math.min(screenWidth - 4, mouseX - 4));
712 750 mouseY = Math.max(0, Math.min(screenHeight - 16, mouseY));
713 751 drawRect(mouseX - textSize - 2, mouseY, mouseX + 2, mouseY + 12, backgroundColour);
714   - fontRenderer.drawStringWithShadow(tooltipText, mouseX - textSize, mouseY + 2, colour); // TODO OBF MCPTEST drawStringWithShadow - func_175063_a
  752 + fontRenderer.drawStringWithShadow(tooltipText, mouseX - textSize, mouseY + 2, colour);
715 753 }
716 754  
717 755  
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelAbout.java
... ... @@ -23,13 +23,15 @@ import com.mumfrey.liteloader.util.SortableValue;
23 23 import com.mumfrey.liteloader.util.render.Icon;
24 24  
25 25 /**
26   - * "About LiteLoader" panel which docks in the mod info screen and lists information about the installed APIs
  26 + * "About LiteLoader" panel which docks in the mod info screen and lists
  27 + * information about the installed APIs.
27 28 *
28 29 * @author Adam Mummery-Smith
29 30 */
30 31 class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
31 32 {
32   - public static final IconAbsolute apiIconCoords = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, "api_icon", 32, 32, 192, 144, 256, 208);
  33 + public static final IconAbsolute apiIconCoords = new IconAbsolute(LiteLoaderBrandingProvider.ABOUT_TEXTURE, "api_icon",
  34 + 32, 32, 192, 144, 256, 208);
33 35  
34 36 private static final int ROW_HEIGHT = 40;
35 37  
... ... @@ -51,7 +53,8 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
51 53  
52 54 this.sortBrandingProviders();
53 55  
54   - this.scrollPane.addControl(new GuiHoverLabel(-2, 38, 22 + this.brandings.size() * GuiPanelAbout.ROW_HEIGHT, this.mc.fontRendererObj, "\247n" + MCP_URI.toString(), this.parent.getBrandColour()));
  56 + this.scrollPane.addControl(new GuiHoverLabel(-2, 38, 22 + this.brandings.size() * GuiPanelAbout.ROW_HEIGHT, this.mc.fontRendererObj,
  57 + "\247n" + MCP_URI.toString(), this.parent.getBrandColour()));
55 58 }
56 59  
57 60 /**
... ... @@ -66,9 +69,10 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
66 69 BrandingProvider brandingProvider = LiteLoader.getCustomisationProvider(api, BrandingProvider.class);
67 70 if (brandingProvider != null)
68 71 {
69   - sortedBrandingProviders.add(new SortableValue<BrandingProvider>(Integer.MAX_VALUE - brandingProvider.getPriority(), 0, brandingProvider));
  72 + sortedBrandingProviders.add(new SortableValue<BrandingProvider>(Integer.MAX_VALUE - brandingProvider.getPriority(), 0,
  73 + brandingProvider));
70 74 }
71   - }
  75 + }
72 76  
73 77 int brandingIndex = 0;
74 78  
... ... @@ -80,7 +84,8 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
80 84 URI homepage = brandingProvider.getHomepage();
81 85 if (homepage != null)
82 86 {
83   - this.scrollPane.addControl(new GuiHoverLabel(brandingIndex, 38, 22 + brandingIndex * GuiPanelAbout.ROW_HEIGHT, this.mc.fontRendererObj, "\247n" + homepage, this.parent.getBrandColour()));
  87 + this.scrollPane.addControl(new GuiHoverLabel(brandingIndex, 38, 22 + brandingIndex * GuiPanelAbout.ROW_HEIGHT,
  88 + this.mc.fontRendererObj, "\247n" + homepage, this.parent.getBrandColour()));
84 89 }
85 90  
86 91 brandingIndex++;
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelConfigContainer.java
... ... @@ -11,8 +11,9 @@ import com.mumfrey.liteloader.modconfig.ConfigPanel;
11 11 import com.mumfrey.liteloader.modconfig.ConfigPanelHost;
12 12  
13 13 /**
14   - * Config panel container, this handles drawing the configuration panel chrome and also hosts the
15   - * configuration panels themselves to support scrolling and stuff
  14 + * Config panel container, this handles drawing the configuration panel chrome
  15 + * and also hosts the configuration panels themselves to support scrolling and
  16 + * stuff.
16 17 *
17 18 * @author Adam Mummery-Smith
18 19 */
... ... @@ -186,7 +187,8 @@ class GuiPanelConfigContainer extends GuiPanel implements ConfigPanelHost
186 187  
187 188 // Update and draw scroll bar
188 189 this.scrollBar.setMaxValue(this.totalHeight - this.innerHeight);
189   - this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, this.width - MARGIN - 5, TOP, 5, this.innerHeight, Math.max(this.innerHeight, this.totalHeight));
  190 + this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, this.width - MARGIN - 5, TOP, 5, this.innerHeight,
  191 + Math.max(this.innerHeight, this.totalHeight));
190 192  
191 193 // Draw other buttons
192 194 super.draw(mouseX, mouseY, partialTicks);
... ... @@ -221,7 +223,9 @@ class GuiPanelConfigContainer extends GuiPanel implements ConfigPanelHost
221 223 if (mouseButton == 0)
222 224 {
223 225 if (this.scrollBar.wasMouseOver())
  226 + {
224 227 this.scrollBar.setDragging(true);
  228 + }
225 229 }
226 230  
227 231 super.mousePressed(mouseX, mouseY, mouseButton);
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelLiteLoaderLog.java
... ... @@ -89,9 +89,12 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
89 89 {
90 90 super.setSize(width, height);
91 91  
92   - this.controls.add(new GuiButton(0, this.width - 59 - MARGIN, this.height - BOTTOM + 9, 60, 20, I18n.format("gui.done")));
93   - this.controls.add(this.btnUpload = new GuiButton(1, this.width - 145 - MARGIN, this.height - BOTTOM + 9, 80, 20, I18n.format("gui.log.postlog")));
94   - this.controls.add(this.chkScale = new GuiCheckbox(2, MARGIN, this.height - BOTTOM + 15, I18n.format("gui.log.scalecheckbox")));
  92 + this.controls.add(new GuiButton(0, this.width - 59 - MARGIN, this.height - BOTTOM + 9, 60, 20,
  93 + I18n.format("gui.done")));
  94 + this.controls.add(this.btnUpload = new GuiButton(1, this.width - 145 - MARGIN, this.height - BOTTOM + 9, 80, 20,
  95 + I18n.format("gui.log.postlog")));
  96 + this.controls.add(this.chkScale = new GuiCheckbox(2, MARGIN, this.height - BOTTOM + 15,
  97 + I18n.format("gui.log.scalecheckbox")));
95 98  
96 99 this.chkScale.checked = GuiPanelLiteLoaderLog.useNativeRes;
97 100  
... ... @@ -142,7 +145,8 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
142 145 {
143 146 LiteLoaderLogger.info("Log file upload succeeded, url is %s", this.logURL);
144 147 int urlWidth = this.mc.fontRendererObj.getStringWidth(this.logURL);
145   - this.controls.add(new GuiHoverLabel(3, xMid - (urlWidth / 2), this.height / 2, this.mc.fontRendererObj, "\247n" + this.logURL, this.parent.getBrandColour()));
  148 + this.controls.add(new GuiHoverLabel(3, xMid - (urlWidth / 2), this.height / 2, this.mc.fontRendererObj, "\247n" + this.logURL,
  149 + this.parent.getBrandColour()));
146 150 }
147 151 else
148 152 {
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelMods.java
... ... @@ -26,7 +26,7 @@ import com.mumfrey.liteloader.modconfig.ConfigPanel;
26 26 * @author Adam Mummery-Smith
27 27 */
28 28 public class GuiPanelMods extends GuiPanel implements ModListContainer
29   -{
  29 +{
30 30 private static final int SCROLLBAR_WIDTH = 5;
31 31  
32 32 private final GuiLiteLoaderPanel parentScreen;
... ... @@ -58,7 +58,8 @@ public class GuiPanelMods extends GuiPanel implements ModListContainer
58 58 */
59 59 private GuiSimpleScrollBar scrollBar = new GuiSimpleScrollBar();
60 60  
61   - public GuiPanelMods(GuiLiteLoaderPanel parentScreen, Minecraft minecraft, LiteLoaderMods mods, LoaderEnvironment environment, ConfigManager configManager, int brandColour, List<ModInfoDecorator> decorators)
  61 + public GuiPanelMods(GuiLiteLoaderPanel parentScreen, Minecraft minecraft, LiteLoaderMods mods, LoaderEnvironment environment,
  62 + ConfigManager configManager, int brandColour, List<ModInfoDecorator> decorators)
62 63 {
63 64 super(minecraft);
64 65  
... ... @@ -106,8 +107,10 @@ public class GuiPanelMods extends GuiPanel implements ModListContainer
106 107 int rightPanelLeftEdge = MARGIN + 4 + (this.width - MARGIN - MARGIN - 4) / 2;
107 108  
108 109 this.controls.clear();
109   - this.controls.add(this.btnToggle = new GuiButton(0, rightPanelLeftEdge, this.height - GuiLiteLoaderPanel.PANEL_BOTTOM - 24, 90, 20, I18n.format("gui.enablemod")));
110   - this.controls.add(this.btnConfig = new GuiButton(1, rightPanelLeftEdge + 92, this.height - GuiLiteLoaderPanel.PANEL_BOTTOM - 24, 69, 20, I18n.format("gui.modsettings")));
  110 + this.controls.add(this.btnToggle = new GuiButton(0, rightPanelLeftEdge, this.height - GuiLiteLoaderPanel.PANEL_BOTTOM - 24, 90, 20,
  111 + I18n.format("gui.enablemod")));
  112 + this.controls.add(this.btnConfig = new GuiButton(1, rightPanelLeftEdge + 92, this.height - GuiLiteLoaderPanel.PANEL_BOTTOM - 24, 69, 20,
  113 + I18n.format("gui.modsettings")));
111 114  
112 115 this.modList.setSize(width, height);
113 116 }
... ... @@ -252,7 +255,8 @@ public class GuiPanelMods extends GuiPanel implements ModListContainer
252 255 */
253 256 private void drawModsList(int mouseX, int mouseY, float partialTicks, int width, int height)
254 257 {
255   - this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, MARGIN + width - SCROLLBAR_WIDTH, GuiLiteLoaderPanel.PANEL_TOP, SCROLLBAR_WIDTH, height, this.listHeight);
  258 + this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, MARGIN + width - SCROLLBAR_WIDTH, GuiLiteLoaderPanel.PANEL_TOP, SCROLLBAR_WIDTH,
  259 + height, this.listHeight);
256 260  
257 261 // clip outside of scroll area
258 262 glEnableClipping(MARGIN, MARGIN + width - SCROLLBAR_WIDTH - 1, GuiLiteLoaderPanel.PANEL_TOP, this.height - GuiLiteLoaderPanel.PANEL_BOTTOM);
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelUpdateCheck.java
... ... @@ -22,6 +22,8 @@ import com.mumfrey.liteloader.update.UpdateSite;
22 22 */
23 23 class GuiPanelUpdateCheck extends GuiPanel
24 24 {
  25 + private static final int WHITE = 0xFFFFFFFF;
  26 +
25 27 /**
26 28 * URI to open if a new version is available
27 29 */
... ... @@ -51,7 +53,8 @@ class GuiPanelUpdateCheck extends GuiPanel
51 53  
52 54 private boolean canForceUpdate, updateForced;
53 55  
54   - public GuiPanelUpdateCheck(GuiLiteLoaderPanel parentScreen, Minecraft minecraft, UpdateSite updateSite, String updateName, LoaderProperties properties)
  56 + public GuiPanelUpdateCheck(GuiLiteLoaderPanel parentScreen, Minecraft minecraft, UpdateSite updateSite, String updateName,
  57 + LoaderProperties properties)
55 58 {
56 59 super(minecraft);
57 60  
... ... @@ -67,9 +70,12 @@ class GuiPanelUpdateCheck extends GuiPanel
67 70 {
68 71 super.setSize(width, height);
69 72  
70   - this.controls.add(new GuiButton(0, this.width - 99 - MARGIN, this.height - BOTTOM + 9, 100, 20, this.updateForced ? I18n.format("gui.exitgame") : I18n.format("gui.done")));
71   - this.controls.add(this.btnCheck = new GuiButton(1, MARGIN + 16, TOP + 16, 100, 20, I18n.format("gui.checknow")));
72   - this.controls.add(this.btnDownload = new GuiButton(2, MARGIN + 16, TOP + 118, 100, 20, this.canForceUpdate ? I18n.format("gui.forceupdate") : I18n.format("gui.downloadupdate")));
  73 + this.controls.add(new GuiButton(0, this.width - 99 - MARGIN, this.height - BOTTOM + 9, 100, 20,
  74 + this.updateForced ? I18n.format("gui.exitgame") : I18n.format("gui.done")));
  75 + this.controls.add(this.btnCheck = new GuiButton(1, MARGIN + 16, TOP + 16, 100, 20,
  76 + I18n.format("gui.checknow")));
  77 + this.controls.add(this.btnDownload = new GuiButton(2, MARGIN + 16, TOP + 118, 100, 20,
  78 + this.canForceUpdate ? I18n.format("gui.forceupdate") : I18n.format("gui.downloadupdate")));
73 79 }
74 80  
75 81 @Override
... ... @@ -78,7 +84,7 @@ class GuiPanelUpdateCheck extends GuiPanel
78 84 FontRenderer fontRenderer = this.mc.fontRendererObj;
79 85  
80 86 // Draw panel title
81   - fontRenderer.drawString(this.panelTitle, MARGIN, TOP - 14, 0xFFFFFFFF);
  87 + fontRenderer.drawString(this.panelTitle, MARGIN, TOP - 14, GuiPanelUpdateCheck.WHITE);
82 88  
83 89 // Draw top and bottom horizontal bars
84 90 drawRect(MARGIN, TOP - 4, this.width - MARGIN, TOP - 3, 0xFF999999);
... ... @@ -90,23 +96,25 @@ class GuiPanelUpdateCheck extends GuiPanel
90 96 if (this.updateSite.isCheckInProgress())
91 97 {
92 98 this.drawThrobber(MARGIN, TOP + 40, this.throb);
93   - fontRenderer.drawString(I18n.format("gui.updates.status.checking", ""), MARGIN + 18, TOP + 44, 0xFFFFFFFF);
  99 + fontRenderer.drawString(I18n.format("gui.updates.status.checking", ""), MARGIN + 18, TOP + 44, GuiPanelUpdateCheck.WHITE);
94 100 }
95 101 else if (this.updateSite.isCheckComplete())
96 102 {
97 103 boolean success = this.updateSite.isCheckSucceess();
98 104 String status = success ? I18n.format("gui.updates.status.success") : I18n.format("gui.updates.status.failed");
99   - fontRenderer.drawString(I18n.format("gui.updates.status.checking", status), MARGIN + 18, TOP + 44, 0xFFFFFFFF);
  105 + fontRenderer.drawString(I18n.format("gui.updates.status.checking", status), MARGIN + 18, TOP + 44, GuiPanelUpdateCheck.WHITE);
100 106  
101 107 if (success)
102 108 {
103   - fontRenderer.drawString(I18n.format("gui.updates.available.title"), MARGIN + 18, TOP + 70, 0xFFFFFFFF);
  109 + fontRenderer.drawString(I18n.format("gui.updates.available.title"), MARGIN + 18, TOP + 70, GuiPanelUpdateCheck.WHITE);
104 110 if (this.updateSite.isUpdateAvailable())
105 111 {
106 112 this.btnDownload.visible = !this.updateForced;
107   - fontRenderer.drawString(I18n.format("gui.updates.available.newversion"), MARGIN + 18, TOP + 84, 0xFFFFFFFF);
108   - fontRenderer.drawString(I18n.format("gui.updates.available.version", this.updateSite.getAvailableVersion()), MARGIN + 18, TOP + 94, 0xFFFFFFFF);
109   - fontRenderer.drawString(I18n.format("gui.updates.available.date", this.updateSite.getAvailableVersionDate()), MARGIN + 18, TOP + 104, 0xFFFFFFFF);
  113 + fontRenderer.drawString(I18n.format("gui.updates.available.newversion"), MARGIN + 18, TOP + 84, GuiPanelUpdateCheck.WHITE);
  114 + fontRenderer.drawString(I18n.format("gui.updates.available.version", this.updateSite.getAvailableVersion()),
  115 + MARGIN + 18, TOP + 94, GuiPanelUpdateCheck.WHITE);
  116 + fontRenderer.drawString(I18n.format("gui.updates.available.date", this.updateSite.getAvailableVersionDate()),
  117 + MARGIN + 18, TOP + 104, GuiPanelUpdateCheck.WHITE);
110 118  
111 119 if (this.updateForced)
112 120 {
... ... @@ -115,13 +123,13 @@ class GuiPanelUpdateCheck extends GuiPanel
115 123 }
116 124 else
117 125 {
118   - fontRenderer.drawString(I18n.format("gui.updates.available.nonewversion"), MARGIN + 18, TOP + 84, 0xFFFFFFFF);
  126 + fontRenderer.drawString(I18n.format("gui.updates.available.nonewversion"), MARGIN + 18, TOP + 84, GuiPanelUpdateCheck.WHITE);
119 127 }
120 128 }
121 129 }
122 130 else
123 131 {
124   - fontRenderer.drawString(I18n.format("gui.updates.status.idle"), MARGIN + 18, TOP + 44, 0xFFFFFFFF);
  132 + fontRenderer.drawString(I18n.format("gui.updates.status.idle"), MARGIN + 18, TOP + 44, GuiPanelUpdateCheck.WHITE);
125 133 }
126 134  
127 135 super.draw(mouseX, mouseY, partialTicks);
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiScrollPanel.java
... ... @@ -129,7 +129,8 @@ class GuiScrollPanel extends GuiPanel
129 129 glPopMatrix();
130 130  
131 131 // Update and draw scroll bar
132   - this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, this.left + this.width - 5, this.top, 5, this.height, Math.max(this.height, this.contentHeight));
  132 + this.scrollBar.drawScrollBar(mouseX, mouseY, partialTicks, this.left + this.width - 5, this.top, 5, this.height,
  133 + Math.max(this.height, this.contentHeight));
133 134 }
134 135  
135 136 @Override
... ... @@ -153,7 +154,9 @@ class GuiScrollPanel extends GuiPanel
153 154 if (mouseButton == 0)
154 155 {
155 156 if (this.scrollBar.wasMouseOver())
  157 + {
156 158 this.scrollBar.setDragging(true);
  159 + }
157 160 }
158 161 }
159 162  
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiSimpleScrollBar.java
... ... @@ -51,7 +51,8 @@ public class GuiSimpleScrollBar extends Gui
51 51 }
52 52  
53 53 /**
54   - * Set the scroll value, the value is clamped between 0 and the current max value
  54 + * Set the scroll value, the value is clamped between 0 and the current max
  55 + * value.
55 56 */
56 57 public void setValue(int value)
57 58 {
... ... @@ -59,7 +60,8 @@ public class GuiSimpleScrollBar extends Gui
59 60 }
60 61  
61 62 /**
62   - * Offset the scroll value by the specified amount, the value is clamped between 0 and the current max value
  63 + * Offset the scroll value by the specified amount, the value is clamped
  64 + * between 0 and the current max value.
63 65 */
64 66 public void offsetValue(int offset)
65 67 {
... ...
src/client/java/com/mumfrey/liteloader/client/gui/ScrollPanelContent.java
... ... @@ -6,7 +6,7 @@ public interface ScrollPanelContent
6 6 {
7 7 public abstract int getScrollPanelContentHeight(GuiScrollPanel source);
8 8  
9   - public abstract void drawScrollPanelContent(GuiScrollPanel source, int mouseX, int mouseY, float partialTicks, int scrollAmount, int visibleHeight);
  9 + public abstract void drawScrollPanelContent(GuiScrollPanel source, int mouseX, int mouseY, float partialTicks, int scrollAmt, int visibleHeight);
10 10  
11 11 public abstract void scrollPanelActionPerformed(GuiScrollPanel source, GuiButton control);
12 12  
... ...
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModInfoPanel.java
... ... @@ -59,7 +59,8 @@ public class GuiModInfoPanel extends Gui
59 59  
60 60 drawRect(xPosition + 5, yPos, xPosition + width, yPos + 1, GuiModInfoPanel.DIVIDER_COLOUR); yPos += 4; // divider
61 61  
62   - this.fontRenderer.drawString(I18n.format("gui.about.authors") + ": \2477" + this.modInfo.getAuthor(), xPosition + 5, yPos, GuiModInfoPanel.AUTHORS_COLOUR); yPos += 10;
  62 + this.fontRenderer.drawString(I18n.format("gui.about.authors") + ": \2477" + this.modInfo.getAuthor(), xPosition + 5, yPos,
  63 + GuiModInfoPanel.AUTHORS_COLOUR); yPos += 10;
63 64 if (!Strings.isNullOrEmpty(this.modInfo.getURL()))
64 65 {
65 66 this.fontRenderer.drawString(this.modInfo.getURL(), xPosition + 5, yPos, GuiModListPanel.BLEND_2THRDS & this.brandColour); yPos += 10;
... ...
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModListPanel.java
... ... @@ -106,7 +106,8 @@ public class GuiModListPanel extends Gui
106 106 int titleColour = this.getTitleColour(selected);
107 107 int statusColour = this.getStatusColour(selected);
108 108  
109   - this.drawGradientRect(xPosition, yPosition, xPosition + width, yPosition + GuiModListPanel.PANEL_HEIGHT, gradientColour, GuiModListPanel.GRADIENT_COLOUR2);
  109 + this.drawGradientRect(xPosition, yPosition, xPosition + width, yPosition + GuiModListPanel.PANEL_HEIGHT, gradientColour,
  110 + GuiModListPanel.GRADIENT_COLOUR2);
110 111  
111 112 String titleText = this.owner.getTitleText();
112 113 String versionText = this.owner.getVersionText();
... ... @@ -128,7 +129,8 @@ public class GuiModListPanel extends Gui
128 129  
129 130 for (ModInfoDecorator decorator : this.decorators)
130 131 {
131   - decorator.onDrawListEntry(mouseX, mouseY, partialTicks, xPosition, yPosition, width, GuiModListPanel.PANEL_HEIGHT, selected, this.modInfo, gradientColour, titleColour, statusColour);
  132 + decorator.onDrawListEntry(mouseX, mouseY, partialTicks, xPosition, yPosition, width, GuiModListPanel.PANEL_HEIGHT, selected,
  133 + this.modInfo, gradientColour, titleColour, statusColour);
132 134 }
133 135 }
134 136  
... ... @@ -172,7 +174,8 @@ public class GuiModListPanel extends Gui
172 174 if (tooltipText != null)
173 175 {
174 176 glDisableClipping();
175   - GuiLiteLoaderPanel.drawTooltip(this.fontRenderer, tooltipText, mouseX, mouseY, 4096, 4096, GuiModListPanel.WHITE, GuiModListPanel.BLEND_HALF & GuiModListPanel.BLACK);
  177 + GuiLiteLoaderPanel.drawTooltip(this.fontRenderer, tooltipText, mouseX, mouseY, 4096, 4096, GuiModListPanel.WHITE,
  178 + GuiModListPanel.BLEND_HALF & GuiModListPanel.BLACK);
176 179 glEnableClipping();
177 180 }
178 181  
... ... @@ -187,7 +190,10 @@ public class GuiModListPanel extends Gui
187 190 */
188 191 protected int getGradientColour(boolean selected)
189 192 {
190   - return GuiModListPanel.BLEND_2THRDS & (this.owner.isErrored() ? (selected ? GuiModListPanel.ERROR_GRADIENT_COLOUR : GuiModListPanel.ERROR_GRADIENT_COLOUR2) : (selected ? (this.owner.isExternal() ? GuiModListPanel.EXTERNAL_ENTRY_COLOUR : this.brandColour) : GuiModListPanel.BLACK));
  193 + return GuiModListPanel.BLEND_2THRDS
  194 + & (this.owner.isErrored()
  195 + ? (selected ? GuiModListPanel.ERROR_GRADIENT_COLOUR : GuiModListPanel.ERROR_GRADIENT_COLOUR2)
  196 + : (selected ? (this.owner.isExternal() ? GuiModListPanel.EXTERNAL_ENTRY_COLOUR : this.brandColour) : GuiModListPanel.BLACK));
191 197 }
192 198  
193 199 /**
... ...
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModListPanelInvalid.java
... ... @@ -11,7 +11,8 @@ public class GuiModListPanelInvalid extends GuiModListPanel
11 11 {
12 12 private static final int BAD_PANEL_HEIGHT = 22;
13 13  
14   - public GuiModListPanelInvalid(ModListEntry owner, FontRenderer fontRenderer, int brandColour, ModInfo<?> modInfo, List<ModInfoDecorator> decorators)
  14 + public GuiModListPanelInvalid(ModListEntry owner, FontRenderer fontRenderer, int brandColour, ModInfo<?> modInfo,
  15 + List<ModInfoDecorator> decorators)
15 16 {
16 17 super(owner, fontRenderer, brandColour, modInfo, decorators);
17 18 }
... ...
src/client/java/com/mumfrey/liteloader/client/gui/modlist/ModList.java
... ... @@ -38,7 +38,8 @@ public class ModList
38 38  
39 39 private boolean hasConfig = false;