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,6 +17,7 @@ buildscript {
17 } 17 }
18 18
19 apply plugin: 'net.minecraftforge.gradle.tweaker-client' 19 apply plugin: 'net.minecraftforge.gradle.tweaker-client'
  20 +apply plugin: 'checkstyle'
20 apply plugin: 'maven' 21 apply plugin: 'maven'
21 22
22 // Artefact details 23 // Artefact details
@@ -60,6 +61,17 @@ sourceSets { @@ -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 javadoc { 75 javadoc {
64 source sourceSets.client.allJava 76 source sourceSets.client.allJava
65 source sourceSets.debug.allJava 77 source sourceSets.debug.allJava
@@ -110,7 +122,7 @@ task runClient(type: JavaExec, overwrite: true) { @@ -110,7 +122,7 @@ task runClient(type: JavaExec, overwrite: true) {
110 } 122 }
111 123
112 tasks.withType(JavaCompile) { 124 tasks.withType(JavaCompile) {
113 - options.compilerArgs += ['-Xlint:all', '-Xlint:-path'] 125 + options.compilerArgs += ['-Xlint:all', '-Xlint:-path', '-Xlint:-rawtypes']
114 options.deprecation = true 126 options.deprecation = true
115 options.encoding = 'utf8' 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,11 +13,13 @@ import net.minecraft.util.IChatComponent;
13 public interface ChatFilter extends LiteMod 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 * @param chat ChatMessageComponent parsed from the chat packet 19 * @param chat ChatMessageComponent parsed from the chat packet
19 * @param message Chat message parsed from the chat message component 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 * @return True to keep the packet, false to discard 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,7 +4,8 @@ import net.minecraft.client.renderer.entity.Render;
4 import net.minecraft.entity.Entity; 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 * @author Adam Mummery-Smith 10 * @author Adam Mummery-Smith
10 */ 11 */
src/client/java/com/mumfrey/liteloader/FrameBufferListener.java
@@ -3,20 +3,23 @@ package com.mumfrey.liteloader; @@ -3,20 +3,23 @@ package com.mumfrey.liteloader;
3 import net.minecraft.client.shader.Framebuffer; 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 * @author Adam Mummery-Smith 9 * @author Adam Mummery-Smith
9 */ 10 */
10 public interface FrameBufferListener extends LiteMod 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 public abstract void preRenderFBO(Framebuffer fbo); 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 * @param fbo FBO instance 24 * @param fbo FBO instance
22 * @param width FBO width 25 * @param width FBO width
src/client/java/com/mumfrey/liteloader/InitCompleteListener.java
@@ -5,15 +5,17 @@ import net.minecraft.client.Minecraft; @@ -5,15 +5,17 @@ import net.minecraft.client.Minecraft;
5 import com.mumfrey.liteloader.core.LiteLoader; 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 * @author Adam Mummery-Smith 12 * @author Adam Mummery-Smith
12 */ 13 */
13 public interface InitCompleteListener extends Tickable 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 * @param minecraft Minecraft instance 20 * @param minecraft Minecraft instance
19 * @param loader LiteLoader instance 21 * @param loader LiteLoader instance
src/client/java/com/mumfrey/liteloader/JoinGameListener.java
@@ -8,7 +8,8 @@ import com.mojang.realmsclient.dto.RealmsServer; @@ -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 * @author Adam Mummery-Smith 14 * @author Adam Mummery-Smith
14 */ 15 */
@@ -19,8 +20,10 @@ public interface JoinGameListener extends LiteMod @@ -19,8 +20,10 @@ public interface JoinGameListener extends LiteMod
19 * 20 *
20 * @param netHandler Net handler 21 * @param netHandler Net handler
21 * @param joinGamePacket Join game packet 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 public abstract void onJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket, ServerData serverData, RealmsServer realmsServer); 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,7 +8,8 @@ package com.mumfrey.liteloader;
8 public interface OutboundChatFilter extends LiteMod 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 * @param message 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,7 +10,8 @@ import net.minecraft.network.play.client.C01PacketChatMessage;
10 public interface OutboundChatListener extends LiteMod 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 * @param packet 16 * @param packet
16 * @param message 17 * @param message
src/client/java/com/mumfrey/liteloader/PostLoginListener.java
@@ -10,8 +10,9 @@ import net.minecraft.network.login.server.S02PacketLoginSuccess; @@ -10,8 +10,9 @@ import net.minecraft.network.login.server.S02PacketLoginSuccess;
10 public interface PostLoginListener extends LiteMod 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 * @param netHandler 17 * @param netHandler
17 * @param packet 18 * @param packet
src/client/java/com/mumfrey/liteloader/PreRenderListener.java
@@ -10,14 +10,16 @@ import net.minecraft.client.renderer.RenderGlobal; @@ -10,14 +10,16 @@ import net.minecraft.client.renderer.RenderGlobal;
10 public interface PreRenderListener extends LiteMod 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 * @param partialTicks 16 * @param partialTicks
16 */ 17 */
17 public abstract void onRenderWorld(float partialTicks); 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 * @param partialTicks 24 * @param partialTicks
23 * @param pass 25 * @param pass
@@ -26,7 +28,8 @@ public interface PreRenderListener extends LiteMod @@ -26,7 +28,8 @@ public interface PreRenderListener extends LiteMod
26 public abstract void onSetupCameraTransform(float partialTicks, int pass, long timeSlice); 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 * @param partialTicks 34 * @param partialTicks
32 * @param pass 35 * @param pass
@@ -34,7 +37,8 @@ public interface PreRenderListener extends LiteMod @@ -34,7 +37,8 @@ public interface PreRenderListener extends LiteMod
34 public abstract void onRenderSky(float partialTicks, int pass); 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 * @param renderGlobal 43 * @param renderGlobal
40 * @param partialTicks 44 * @param partialTicks
@@ -43,7 +47,8 @@ public interface PreRenderListener extends LiteMod @@ -43,7 +47,8 @@ public interface PreRenderListener extends LiteMod
43 public abstract void onRenderClouds(float partialTicks, int pass, RenderGlobal renderGlobal); 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 * @param partialTicks 53 * @param partialTicks
49 * @param pass 54 * @param pass
src/client/java/com/mumfrey/liteloader/ScreenshotListener.java
@@ -13,15 +13,16 @@ import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue; @@ -13,15 +13,16 @@ import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue;
13 public interface ScreenshotListener extends LiteMod 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 * @param screenshotName 19 * @param screenshotName
20 * @param width 20 * @param width
21 * @param height 21 * @param height
22 * @param fbo 22 * @param fbo
23 * @param message Message to return if the event is cancelled 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 public boolean onSaveScreenshot(String screenshotName, int width, int height, Framebuffer fbo, ReturnValue<IChatComponent> message); 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,7 +15,8 @@ public interface Tickable extends LiteMod
15 * @param minecraft Minecraft instance 15 * @param minecraft Minecraft instance
16 * @param partialTicks Partial tick value 16 * @param partialTicks Partial tick value
17 * @param inGame True if in-game, false if in the menu 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 public abstract void onTick(Minecraft minecraft, float partialTicks, boolean inGame, boolean clock); 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,9 +26,10 @@ import com.mumfrey.liteloader.transformers.event.EventInfo;
26 import com.mumfrey.liteloader.transformers.event.ReturnEventInfo; 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 * @author Adam Mummery-Smith 34 * @author Adam Mummery-Smith
34 */ 35 */
@@ -50,7 +51,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon @@ -50,7 +51,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
50 51
51 if (CallbackProxyClient.clientEventBroker == null) 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 CallbackProxyClient.clientEventBroker.onStartupComplete(); 58 CallbackProxyClient.clientEventBroker.onStartupComplete();
@@ -115,7 +117,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon @@ -115,7 +117,8 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
115 CallbackProxyClient.clientEventBroker.postRenderHUD(partialTicks); 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 CallbackProxyClient.clientEventBroker.onStartServer(e.getSource(), folderName, worldName, worldSettings); 123 CallbackProxyClient.clientEventBroker.onStartServer(e.getSource(), folderName, worldName, worldSettings);
121 } 124 }
@@ -185,24 +188,27 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon @@ -185,24 +188,27 @@ public abstract class CallbackProxyClient extends CallbackProxyCommon
185 CallbackProxyClient.clientEventBroker.onRenderTerrain(partialTicks, pass, timeSlice); 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 CallbackProxyClient.clientEventBroker.onScreenshot(e, name, width, height, fbo); 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 CallbackProxyClient.clientEventBroker.onRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render); 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 CallbackProxyClient.clientEventBroker.onPostRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render); 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 public static void generateOfflineUUID(ReturnEventInfo<Session, GameProfile> e) 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,7 +86,9 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
86 protected boolean send(String channel, PacketBuffer data, ChannelPolicy policy) 86 protected boolean send(String channel, PacketBuffer data, ChannelPolicy policy)
87 { 87 {
88 if (channel == null || channel.length() > 16 || CHANNEL_REGISTER.equals(channel) || CHANNEL_UNREGISTER.equals(channel)) 88 if (channel == null || channel.length() > 16 || CHANNEL_REGISTER.equals(channel) || CHANNEL_UNREGISTER.equals(channel))
  89 + {
89 throw new RuntimeException("Invalid channel name specified"); 90 throw new RuntimeException("Invalid channel name specified");
  91 + }
90 92
91 if (!policy.allows(this, channel)) 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,7 +148,8 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
148 } 148 }
149 149
150 /* (non-Javadoc) 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 @Override 154 @Override
154 public void setKeyBindings(List<KeyBinding> keyBindings) 155 public void setKeyBindings(List<KeyBinding> keyBindings)
src/client/java/com/mumfrey/liteloader/client/LiteLoaderCoreProviderClient.java
1 package com.mumfrey.liteloader.client; 1 package com.mumfrey.liteloader.client;
2 2
  3 +import net.minecraft.client.audio.SoundHandler;
3 import net.minecraft.client.resources.IResourceManager; 4 import net.minecraft.client.resources.IResourceManager;
4 import net.minecraft.client.resources.IResourcePack; 5 import net.minecraft.client.resources.IResourcePack;
5 import net.minecraft.client.resources.SimpleReloadableResourceManager; 6 import net.minecraft.client.resources.SimpleReloadableResourceManager;
@@ -28,12 +29,15 @@ public class LiteLoaderCoreProviderClient implements CoreProvider @@ -28,12 +29,15 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
28 private final LoaderProperties properties; 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 private boolean inhibitSoundManagerReload = true; 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 private SoundHandlerReloadInhibitor soundHandlerReloadInhibitor; 42 private SoundHandlerReloadInhibitor soundHandlerReloadInhibitor;
39 43
@@ -52,7 +56,9 @@ public class LiteLoaderCoreProviderClient implements CoreProvider @@ -52,7 +56,9 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
52 @Override 56 @Override
53 public void onPostInit(GameEngine<?, ?> engine) 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 if (this.inhibitSoundManagerReload) 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,7 +36,7 @@ import com.mumfrey.liteloader.transformers.event.ReturnEventInfo;
36 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 36 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
37 37
38 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener 38 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener
39 -{ 39 +{
40 private static LiteLoaderEventBrokerClient instance; 40 private static LiteLoaderEventBrokerClient instance;
41 41
42 /** 42 /**
@@ -60,8 +60,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -60,8 +60,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
60 private boolean wasFullScreen = false; 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 private int worldHashCode = 0; 66 private int worldHashCode = 0;
67 67
@@ -76,8 +76,10 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -76,8 +76,10 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
76 private FastIterableDeque<ViewportListener> viewportListeners = new HandlerList<ViewportListener>(ViewportListener.class); 76 private FastIterableDeque<ViewportListener> viewportListeners = new HandlerList<ViewportListener>(ViewportListener.class);
77 private FastIterableDeque<FrameBufferListener> frameBufferListeners = new HandlerList<FrameBufferListener>(FrameBufferListener.class); 77 private FastIterableDeque<FrameBufferListener> frameBufferListeners = new HandlerList<FrameBufferListener>(FrameBufferListener.class);
78 private FastIterableDeque<InitCompleteListener> initListeners = new HandlerList<InitCompleteListener>(InitCompleteListener.class); 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 private FastIterableDeque<EntityRenderListener> entityRenderListeners = new HandlerList<EntityRenderListener>(EntityRenderListener.class); 83 private FastIterableDeque<EntityRenderListener> entityRenderListeners = new HandlerList<EntityRenderListener>(EntityRenderListener.class);
82 84
83 @SuppressWarnings("cast") 85 @SuppressWarnings("cast")
@@ -103,7 +105,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -103,7 +105,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
103 } 105 }
104 106
105 /* (non-Javadoc) 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 @Override 111 @Override
109 public void registerInterfaces(InterfaceRegistrationDelegate delegate) 112 public void registerInterfaces(InterfaceRegistrationDelegate delegate)
@@ -540,7 +543,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -540,7 +543,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
540 * @param partialTicks 543 * @param partialTicks
541 * @param render 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 this.entityRenderListeners.all().onRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks); 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,7 +559,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
555 * @param partialTicks 559 * @param partialTicks
556 * @param render 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 this.entityRenderListeners.all().onPostRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks); 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,7 +41,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
41 private Minecraft minecraft; 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 private boolean displayModInfoScreenTab = true; 47 private boolean displayModInfoScreenTab = true;
47 48
@@ -51,8 +52,9 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -51,8 +52,9 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
51 private boolean tabAlwaysExpanded = false; 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 private boolean hideModInfoScreenTab = false; 59 private boolean hideModInfoScreenTab = false;
58 60
@@ -61,8 +63,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -61,8 +63,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
61 private String notification; 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 private GuiLiteLoaderPanel panelHost; 69 private GuiLiteLoaderPanel panelHost;
68 70
@@ -114,7 +116,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -114,7 +116,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
114 } 116 }
115 117
116 /* (non-Javadoc) 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 @Override 122 @Override
120 public void onTick(boolean clock, float partialTicks, boolean inGame) 123 public void onTick(boolean clock, float partialTicks, boolean inGame)
@@ -140,7 +143,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -140,7 +143,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
140 } 143 }
141 144
142 /* (non-Javadoc) 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 @Override 149 @Override
146 public void onPostRender(int mouseX, int mouseY, float partialTicks) 150 public void onPostRender(int mouseX, int mouseY, float partialTicks)
@@ -149,12 +153,14 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -149,12 +153,14 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
149 153
150 boolean tabHidden = this.isTabHidden() && this.minecraft.currentScreen instanceof GuiMainMenu; 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 // If we're at the main menu, prepare the overlay 159 // If we're at the main menu, prepare the overlay
155 if (this.panelHost == null || this.panelHost.getScreen() != this.minecraft.currentScreen) 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 if (this.notification != null) 164 if (this.notification != null)
159 { 165 {
160 this.panelHost.setNotification(this.notification); 166 this.panelHost.setNotification(this.notification);
@@ -170,14 +176,18 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -170,14 +176,18 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
170 this.panelHost.release(); 176 this.panelHost.release();
171 this.panelHost = null; 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 this.displayLiteLoaderPanel(this.minecraft.currentScreen); 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 @Override 192 @Override
183 public void hideTab() 193 public void hideTab()
@@ -247,7 +257,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt; @@ -247,7 +257,8 @@ public class LiteLoaderPanelManager implements PanelManager&lt;GuiScreen&gt;
247 { 257 {
248 if (this.isPanelSupportedOnScreen(parentScreen)) 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 this.minecraft.displayGuiScreen(this.panelHost); 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,11 +45,13 @@ public class PacketEventsClient extends PacketEvents
45 { 45 {
46 private static RealmsServer joiningRealm; 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 @Override 56 @Override
55 public void registerInterfaces(InterfaceRegistrationDelegate delegate) 57 public void registerInterfaces(InterfaceRegistrationDelegate delegate)
@@ -86,7 +88,8 @@ public class PacketEventsClient extends PacketEvents @@ -86,7 +88,8 @@ public class PacketEventsClient extends PacketEvents
86 { 88 {
87 if (chatListener instanceof ChatFilter) 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 else 94 else
92 { 95 {
@@ -127,7 +130,10 @@ public class PacketEventsClient extends PacketEvents @@ -127,7 +130,10 @@ public class PacketEventsClient extends PacketEvents
127 } 130 }
128 131
129 /* (non-Javadoc) 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 @Override 138 @Override
133 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet) 139 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet)
@@ -179,7 +185,10 @@ public class PacketEventsClient extends PacketEvents @@ -179,7 +185,10 @@ public class PacketEventsClient extends PacketEvents
179 } 185 }
180 186
181 /* (non-Javadoc) 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 @Override 193 @Override
185 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet) 194 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet)
@@ -199,13 +208,18 @@ public class PacketEventsClient extends PacketEvents @@ -199,13 +208,18 @@ public class PacketEventsClient extends PacketEvents
199 } 208 }
200 209
201 /* (non-Javadoc) 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 @Override 216 @Override
205 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet) 217 protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet)
206 { 218 {
207 if (packet.getChatComponent() == null) 219 if (packet.getChatComponent() == null)
  220 + {
208 return; 221 return;
  222 + }
209 223
210 IChatComponent originalChat = packet.getChatComponent(); 224 IChatComponent originalChat = packet.getChatComponent();
211 IChatComponent chat = originalChat; 225 IChatComponent chat = originalChat;
src/client/java/com/mumfrey/liteloader/client/ResourceObserver.java
@@ -50,7 +50,8 @@ public class ResourceObserver implements ModLoadObserver @@ -50,7 +50,8 @@ public class ResourceObserver implements ModLoadObserver
50 { 50 {
51 LiteLoaderLogger.info("Adding \"%s\" to active resource pack set", container.getLocation()); 51 LiteLoaderLogger.info("Adding \"%s\" to active resource pack set", container.getLocation());
52 IResourcePack resourcePack = this.initResourcePack(container, modName); 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 if (resources.registerResourcePack(resourcePack)) 55 if (resources.registerResourcePack(resourcePack))
55 { 56 {
56 LiteLoaderLogger.info("Successfully added \"%s\" to active resource pack set", container.getLocation()); 57 LiteLoaderLogger.info("Successfully added \"%s\" to active resource pack set", container.getLocation());
@@ -66,7 +67,8 @@ public class ResourceObserver implements ModLoadObserver @@ -66,7 +67,8 @@ public class ResourceObserver implements ModLoadObserver
66 { 67 {
67 if (container.isDirectory()) 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 resourcePack = new ModResourcePackDir(name, container.toFile()); 72 resourcePack = new ModResourcePackDir(name, container.toFile());
71 } 73 }
72 else 74 else
src/client/java/com/mumfrey/liteloader/client/ResourcesClient.java
@@ -22,7 +22,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac @@ -22,7 +22,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
22 private final Map<String, IResourcePack> registeredResourcePacks = new HashMap<String, IResourcePack>(); 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 private boolean pendingResourceReload; 28 private boolean pendingResourceReload;
28 29
@@ -50,7 +51,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac @@ -50,7 +51,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
50 } 51 }
51 52
52 /* (non-Javadoc) 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 @Override 57 @Override
56 public boolean registerResourcePack(IResourcePack resourcePack) 58 public boolean registerResourcePack(IResourcePack resourcePack)
@@ -72,7 +74,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac @@ -72,7 +74,8 @@ public class ResourcesClient implements Resources&lt;IResourceManager, IResourcePac
72 } 74 }
73 75
74 /* (non-Javadoc) 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 @Override 80 @Override
78 public boolean unRegisterResourcePack(IResourcePack resourcePack) 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,7 +10,8 @@ import com.mumfrey.liteloader.client.util.PrivateFieldsClient;
10 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 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 * @author Adam Mummery-Smith 16 * @author Adam Mummery-Smith
16 */ 17 */
@@ -32,7 +33,8 @@ public class SoundHandlerReloadInhibitor @@ -32,7 +33,8 @@ public class SoundHandlerReloadInhibitor
32 private boolean inhibited; 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 private int storedIndex; 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 +7,8 @@ import com.mumfrey.liteloader.api.TranslationProvider;
7 public class Translator implements TranslationProvider 7 public class Translator implements TranslationProvider
8 { 8 {
9 /* (non-Javadoc) 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 @Override 13 @Override
13 public String translate(String key, Object... args) 14 public String translate(String key, Object... args)
@@ -17,7 +18,8 @@ public class Translator implements TranslationProvider @@ -17,7 +18,8 @@ public class Translator implements TranslationProvider
17 } 18 }
18 19
19 /* (non-Javadoc) 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 @Override 24 @Override
23 public String translate(String locale, String key, Object... args) 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,9 +20,13 @@ public class LiteLoaderBrandingProvider implements BrandingProvider
20 public static final int BRANDING_COLOUR = 0xFF4785D1; 20 public static final int BRANDING_COLOUR = 0xFF4785D1;
21 21
22 public static final ResourceLocation ABOUT_TEXTURE = new ResourceLocation("liteloader", "textures/gui/about.png"); 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 public static final URI LITELOADER_URI = URI.create("http://www.liteloader.com/"); 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,7 +121,8 @@ public class LiteLoaderBrandingProvider implements BrandingProvider
117 } 121 }
118 122
119 /* (non-Javadoc) 123 /* (non-Javadoc)
120 - * @see com.mumfrey.liteloader.api.BrandingProvider#getTwitterAvatarResource() 124 + * @see com.mumfrey.liteloader.api.BrandingProvider
  125 + * #getTwitterAvatarResource()
121 */ 126 */
122 @Override 127 @Override
123 public ResourceLocation getTwitterAvatarResource() 128 public ResourceLocation getTwitterAvatarResource()
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderCoreAPIClient.java
@@ -53,7 +53,8 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI @@ -53,7 +53,8 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI
53 } 53 }
54 54
55 /* (non-Javadoc) 55 /* (non-Javadoc)
56 - * @see com.mumfrey.liteloader.api.LiteAPI#getRequiredDownstreamTransformers() 56 + * @see com.mumfrey.liteloader.api.LiteAPI
  57 + * #getRequiredDownstreamTransformers()
57 */ 58 */
58 @Override 59 @Override
59 public String[] getRequiredDownstreamTransformers() 60 public String[] getRequiredDownstreamTransformers()
@@ -144,7 +145,7 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI @@ -144,7 +145,7 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI
144 if (this.objectFactory == null) 145 if (this.objectFactory == null)
145 { 146 {
146 this.objectFactory = new ObjectFactoryClient(this.environment, this.properties); 147 this.objectFactory = new ObjectFactoryClient(this.environment, this.properties);
147 - } 148 + }
148 149
149 return this.objectFactory; 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,14 +20,17 @@ import com.mumfrey.liteloader.util.render.IconTextured;
20 public class LiteLoaderModInfoDecorator implements ModInfoDecorator 20 public class LiteLoaderModInfoDecorator implements ModInfoDecorator
21 { 21 {
22 /* (non-Javadoc) 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 @Override 26 @Override
26 public void addIcons(final ModInfo<?> mod, List<IconTextured> icons) 27 public void addIcons(final ModInfo<?> mod, List<IconTextured> icons)
27 { 28 {
28 if (mod.hasTweakClass()) 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 @Override 34 @Override
32 public void onClicked(Object source, Object container) 35 public void onClicked(Object source, Object container)
33 { 36 {
@@ -41,7 +44,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator @@ -41,7 +44,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
41 44
42 if (mod.hasEventTransformers()) 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 @Override 50 @Override
46 public void onClicked(Object source, Object container) 51 public void onClicked(Object source, Object container)
47 { 52 {
@@ -55,7 +60,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator @@ -55,7 +60,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
55 60
56 if (mod.hasClassTransformers()) 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 @Override 66 @Override
60 public void onClicked(Object source, Object container) 67 public void onClicked(Object source, Object container)
61 { 68 {
@@ -69,13 +76,16 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator @@ -69,13 +76,16 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
69 76
70 if (mod.usesAPI()) 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 List<Throwable> startupErrors = mod.getStartupErrors(); 83 List<Throwable> startupErrors = mod.getStartupErrors();
76 if (startupErrors != null && startupErrors.size() > 0) 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 @Override 89 @Override
80 public void onClicked(Object source, Object container) 90 public void onClicked(Object source, Object container)
81 { 91 {
@@ -89,7 +99,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator @@ -89,7 +99,9 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
89 } 99 }
90 100
91 /* (non-Javadoc) 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 @Override 106 @Override
95 public String modifyStatusText(ModInfo<?> mod, String statusText) 107 public String modifyStatusText(ModInfo<?> mod, String statusText)
@@ -98,10 +110,13 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator @@ -98,10 +110,13 @@ public class LiteLoaderModInfoDecorator implements ModInfoDecorator
98 } 110 }
99 111
100 /* (non-Javadoc) 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 @Override 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,7 +96,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
96 if (this.engine == null) 96 if (this.engine == null)
97 { 97 {
98 this.engine = new GameEngineClient(); 98 this.engine = new GameEngineClient();
99 - } 99 + }
100 100
101 return this.engine; 101 return this.engine;
102 } 102 }
@@ -118,7 +118,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt; @@ -118,7 +118,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
118 if (this.clientPluginChannels == null) 118 if (this.clientPluginChannels == null)
119 { 119 {
120 this.clientPluginChannels = new ClientPluginChannelsClient(); 120 this.clientPluginChannels = new ClientPluginChannelsClient();
121 - } 121 + }
122 122
123 return this.clientPluginChannels; 123 return this.clientPluginChannels;
124 } 124 }
@@ -129,7 +129,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt; @@ -129,7 +129,7 @@ class ObjectFactoryClient implements ObjectFactory&lt;Minecraft, IntegratedServer&gt;
129 if (this.serverPluginChannels == null) 129 if (this.serverPluginChannels == null)
130 { 130 {
131 this.serverPluginChannels = new ServerPluginChannels(); 131 this.serverPluginChannels = new ServerPluginChannels();
132 - } 132 + }
133 133
134 return this.serverPluginChannels; 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,14 +27,23 @@ public class GuiCheckbox extends GuiButton
27 { 27 {
28 minecraft.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE); 28 minecraft.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE);
29 glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 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 this.drawTexturedModalRect(this.xPosition, this.yPosition, this.checked ? 134 : 122, 80, 12, 12); 35 this.drawTexturedModalRect(this.xPosition, this.yPosition, this.checked ? 134 : 122, 80, 12, 12);
33 this.mouseDragged(minecraft, mouseX, mouseY); 36 this.mouseDragged(minecraft, mouseX, mouseY);
34 37
35 int colour = 0xE0E0E0; 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 this.drawString(minecraft.fontRendererObj, this.displayString, this.xPosition + 16, this.yPosition + 2, colour); 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,7 +36,10 @@ public class GuiHoverLabel extends GuiButton
36 { 36 {
37 if (this.visible) 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 this.fontRenderer.drawString(this.displayString, this.xPosition, this.yPosition, this.hovered ? this.hoverColour : this.colour); 43 this.fontRenderer.drawString(this.displayString, this.xPosition, this.yPosition, this.hovered ? this.hoverColour : this.colour);
41 } 44 }
42 else 45 else
src/client/java/com/mumfrey/liteloader/client/gui/GuiLiteLoaderPanel.java
@@ -36,30 +36,45 @@ import com.mumfrey.liteloader.modconfig.ConfigPanel; @@ -36,30 +36,45 @@ import com.mumfrey.liteloader.modconfig.ConfigPanel;
36 import com.mumfrey.liteloader.util.render.Icon; 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 * @author Adam Mummery-Smith 46 * @author Adam Mummery-Smith
46 */ 47 */
47 public class GuiLiteLoaderPanel extends GuiScreen 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 private static final double TWEEN_RATE = 0.08; 71 private static final double TWEEN_RATE = 0.08;
58 72
59 private static boolean displayErrorToolTip = true; 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 private GuiScreen parentScreen; 79 private GuiScreen parentScreen;
65 80
@@ -84,7 +99,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -84,7 +99,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
84 private double tweenAmount = 0.0; 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 private boolean mouseDown, toggled, toggleable; 105 private boolean mouseDown, toggled, toggleable;
90 106
@@ -131,7 +147,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -131,7 +147,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
131 * @param parentScreen 147 * @param parentScreen
132 * @param mods 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 this.mc = minecraft; 153 this.mc = minecraft;
137 this.fontRendererObj = minecraft.fontRendererObj; 154 this.fontRendererObj = minecraft.fontRendererObj;
@@ -148,7 +165,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -148,7 +165,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
148 165
149 this.initBranding(); 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 this.settingsPanel = new GuiPanelSettings(this, minecraft); 170 this.settingsPanel = new GuiPanelSettings(this, minecraft);
153 171
154 this.startupErrorCount = mods.getStartupErrorCount(); 172 this.startupErrorCount = mods.getStartupErrorCount();
@@ -181,7 +199,7 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -181,7 +199,7 @@ public class GuiLiteLoaderPanel extends GuiScreen
181 if (brandingProvider.getBrandingColour() != 0 && brandingProvider.getPriority() > brandingColourProviderPriority) 199 if (brandingProvider.getBrandingColour() != 0 && brandingProvider.getPriority() > brandingColourProviderPriority)
182 { 200 {
183 brandingColourProviderPriority = brandingProvider.getPriority(); 201 brandingColourProviderPriority = brandingProvider.getPriority();
184 - this.brandColour = 0xFF000000 | brandingProvider.getBrandingColour(); 202 + this.brandColour = GuiLiteLoaderPanel.OPAQUE | brandingProvider.getBrandingColour();
185 } 203 }
186 204
187 ResourceLocation logoResource = brandingProvider.getLogoResource(); 205 ResourceLocation logoResource = brandingProvider.getLogoResource();
@@ -271,11 +289,13 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -271,11 +289,13 @@ public class GuiLiteLoaderPanel extends GuiScreen
271 289
272 this.currentPanel.setSize(this.width - LEFT_EDGE, this.height); 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 if (LiteLoaderVersion.getUpdateSite().canCheckForUpdate() && this.mc.theWorld == null && !this.isSnapshot) 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 Keyboard.enableRepeatEvents(true); 301 Keyboard.enableRepeatEvents(true);
@@ -288,7 +308,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -288,7 +308,8 @@ public class GuiLiteLoaderPanel extends GuiScreen
288 } 308 }
289 309
290 /* (non-Javadoc) 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 @Override 314 @Override
294 public void setWorldAndResolution(Minecraft minecraft, int width, int height) 315 public void setWorldAndResolution(Minecraft minecraft, int width, int height)
@@ -363,11 +384,15 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -363,11 +384,15 @@ public class GuiLiteLoaderPanel extends GuiScreen
363 int offsetMouseX = mouseX - (int)xOffset; 384 int offsetMouseX = mouseX - (int)xOffset;
364 385
365 // Handle mouse stuff here since we won't get mouse events when not the active GUI 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 this.handleMouseClick(offsetMouseX, mouseY, partialTicks, active, mouseOverTab); 391 this.handleMouseClick(offsetMouseX, mouseY, partialTicks, active, mouseOverTab);
368 392
369 // Calculate the tab opacity, not framerate adjusted because we don't really care 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 // Draw the panel contents 397 // Draw the panel contents
373 this.drawPanel(offsetMouseX, mouseY, partialTicks, active, xOffset); 398 this.drawPanel(offsetMouseX, mouseY, partialTicks, active, xOffset);
@@ -391,12 +416,12 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -391,12 +416,12 @@ public class GuiLiteLoaderPanel extends GuiScreen
391 glTranslatef(xOffset, 0.0F, 0.0F); 416 glTranslatef(xOffset, 0.0F, 0.0F);
392 417
393 // Draw the background and left edge 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 if (this.showTab) 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 this.mc.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE); 426 this.mc.getTextureManager().bindTexture(LiteLoaderBrandingProvider.ABOUT_TEXTURE);
402 glDrawTexturedRect(LEFT_EDGE - TAB_WIDTH, TAB_TOP, TAB_WIDTH + 1, TAB_HEIGHT, 80, 80, 122, 160, 0.5F + this.tabOpacity); 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,7 +436,7 @@ public class GuiLiteLoaderPanel extends GuiScreen
411 } 436 }
412 else 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 // Only draw the panel contents if we are actually open 442 // Only draw the panel contents if we are actually open
@@ -470,14 +495,15 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -470,14 +495,15 @@ public class GuiLiteLoaderPanel extends GuiScreen
470 glDrawTexturedRect(right - this.iconCoords.getIconWidth(), MARGIN, this.iconCoords, 1.0F); 495 glDrawTexturedRect(right - this.iconCoords.getIconWidth(), MARGIN, this.iconCoords, 1.0F);
471 496
472 // Draw header text 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 // Draw top and bottom horizontal rules 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 return this.mouseOverLogo; 507 return this.mouseOverLogo;
482 } 508 }
483 509
@@ -487,8 +513,10 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -487,8 +513,10 @@ public class GuiLiteLoaderPanel extends GuiScreen
487 513
488 if (mouseOverTab && this.tweenAmount < 0.01) 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 if (annoyingTip) 521 if (annoyingTip)
494 { 522 {
@@ -505,16 +533,19 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -505,16 +533,19 @@ public class GuiLiteLoaderPanel extends GuiScreen
505 { 533 {
506 if (this.startupErrorCount > 0) 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 else if (this.notification != null) 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 /* (non-Javadoc) 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 @Override 550 @Override
520 protected void actionPerformed(GuiButton button) 551 protected void actionPerformed(GuiButton button)
@@ -586,9 +617,13 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -586,9 +617,13 @@ public class GuiLiteLoaderPanel extends GuiScreen
586 protected void mouseReleased(int mouseX, int mouseY, int button) 617 protected void mouseReleased(int mouseX, int mouseY, int button)
587 { 618 {
588 if (button == -1) 619 if (button == -1)
  620 + {
589 this.currentPanel.mouseMoved(mouseX - LEFT_EDGE, mouseY); 621 this.currentPanel.mouseMoved(mouseX - LEFT_EDGE, mouseY);
  622 + }
590 else 623 else
  624 + {
591 this.currentPanel.mouseReleased(mouseX - LEFT_EDGE, mouseY, button); 625 this.currentPanel.mouseReleased(mouseX - LEFT_EDGE, mouseY, button);
  626 + }
592 627
593 if (!this.currentPanel.stealFocus()) 628 if (!this.currentPanel.stealFocus())
594 { 629 {
@@ -661,7 +696,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -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 void openConfigPanel(ConfigPanel panel, LiteMod mod) 702 void openConfigPanel(ConfigPanel panel, LiteMod mod)
667 { 703 {
@@ -694,7 +730,8 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -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 * @param fontRenderer 736 * @param fontRenderer
700 * @param tooltipText 737 * @param tooltipText
@@ -705,13 +742,14 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -705,13 +742,14 @@ public class GuiLiteLoaderPanel extends GuiScreen
705 * @param colour 742 * @param colour
706 * @param backgroundColour 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 int textSize = fontRenderer.getStringWidth(tooltipText); 748 int textSize = fontRenderer.getStringWidth(tooltipText);
711 mouseX = Math.max(0, Math.min(screenWidth - 4, mouseX - 4)); 749 mouseX = Math.max(0, Math.min(screenWidth - 4, mouseX - 4));
712 mouseY = Math.max(0, Math.min(screenHeight - 16, mouseY)); 750 mouseY = Math.max(0, Math.min(screenHeight - 16, mouseY));
713 drawRect(mouseX - textSize - 2, mouseY, mouseX + 2, mouseY + 12, backgroundColour); 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,13 +23,15 @@ import com.mumfrey.liteloader.util.SortableValue;
23 import com.mumfrey.liteloader.util.render.Icon; 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 * @author Adam Mummery-Smith 29 * @author Adam Mummery-Smith
29 */ 30 */
30 class GuiPanelAbout extends GuiPanel implements ScrollPanelContent 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 private static final int ROW_HEIGHT = 40; 36 private static final int ROW_HEIGHT = 40;
35 37
@@ -51,7 +53,8 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent @@ -51,7 +53,8 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
51 53
52 this.sortBrandingProviders(); 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,9 +69,10 @@ class GuiPanelAbout extends GuiPanel implements ScrollPanelContent
66 BrandingProvider brandingProvider = LiteLoader.getCustomisationProvider(api, BrandingProvider.class); 69 BrandingProvider brandingProvider = LiteLoader.getCustomisationProvider(api, BrandingProvider.class);
67 if (brandingProvider != null) 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 - }