Commit 81beb05d6e28ea5285b3e37abd09fb571ebb0325

Authored by Mumfrey
2 parents 9f5bfc13 9c27400c

Merge branch '1.9'

Showing 100 changed files with 1189 additions and 431 deletions

Too many changes to show.

To preserve performance only 100 of 333 files are displayed.

README.MD 0 → 100644
  1 +![LiteLoader Logo](docs/logo.png?raw=true)
  2 +
  3 +**LiteLoader** is a lightweight mod framework designed primarily for client-side
  4 +mods. It aims to provide a wide array of features as possible whilst having
  5 +minimal footprint and very low impact game performance when features are not in
  6 +use.
  7 +
  8 +### Features
  9 +
  10 +* __Simple callback system based on interfaces__. Simply implement the
  11 +interfaces your mod needs
  12 +* __Powerful class transformers__. If LiteLoader can't meet your needs "out of
  13 +the box", you have a wide selection of powerful class transformers at your
  14 +fingertips. It provides access to cutting edge transformers developed for
  15 +LiteLoader but also used by the wider modding community. This guarantees that
  16 +LiteLoader's transformers are the most stable and powerful libraries available
  17 +* __Tiny footprint__. Liteloader injects minimal code into the game, and uses
  18 +native bytecode injection for maximum performance. LiteLoader makes use of Java
  19 +libraries shipped with the base game such as Gson rather than bundling a slew of
  20 +optional libraries
  21 +* __Native bytecode event handlers__. Liteloader generates raw java bytecode for
  22 +event callbacks, this makes its event handlers blazing fast
  23 +
  24 +### License and Permissions
  25 +
  26 +LiteLoader is Copyright 2012-2016 Adam Mummery-Smith All Rights Reserved
  27 +You are free to use the source code for personal reference.
  28 +You may not redistribute modified versions of the loader.
  29 +You may not redistribute the source code in any form without written permission.
  30 +
  31 +### Building the project
  32 +**LiteLoader** uses the [Gradle](http://gradle.org/) build automation
  33 +system. You must have Gradle installed on your system. To build the project
  34 +simply navigate to the project directory in a terminal and execute
  35 +
  36 +```
  37 +gradle
  38 +```
0 \ No newline at end of file 39 \ No newline at end of file
build.gradle
@@ -17,9 +17,9 @@ buildscript { @@ -17,9 +17,9 @@ buildscript {
17 } 17 }
18 } 18 }
19 dependencies { 19 dependencies {
20 - classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' 20 + classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
21 classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0' 21 classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0'
22 - classpath 'org.spongepowered:mixingradle:0.1-SNAPSHOT' 22 + classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
23 } 23 }
24 } 24 }
25 25
@@ -33,14 +33,17 @@ apply plugin: 'org.spongepowered.mixin' @@ -33,14 +33,17 @@ apply plugin: 'org.spongepowered.mixin'
33 defaultTasks 'build' 33 defaultTasks 'build'
34 34
35 ext { 35 ext {
  36 + def isJenkins = project.hasProperty("jenkins")
  37 +
36 // Artefact details 38 // Artefact details
37 - buildNumber = project.hasProperty("buildNumber") ? buildNumber : '0' 39 + buildNumber = isJenkins ? System.env.BUILD_NUMBER : (project.hasProperty("buildNumber") ? buildNumber : '0')
38 buildVersion = project.hasProperty("buildVersion") ? buildVersion : '0.0' 40 buildVersion = project.hasProperty("buildVersion") ? buildVersion : '0.0'
39 ciSystem = project.hasProperty("ciSystem") ? ciSystem : 'unknown' 41 ciSystem = project.hasProperty("ciSystem") ? ciSystem : 'unknown'
40 - commit = project.hasProperty("commit") ? commit : 'unknown' 42 + commit = isJenkins ? System.env.GIT_COMMIT : (project.hasProperty("commit") ? commit : 'unknown')
41 classifier = project.hasProperty("buildType") ? buildType : 'SNAPSHOT' 43 classifier = project.hasProperty("buildType") ? buildType : 'SNAPSHOT'
42 isReleaseBuild = "RELEASE".equals(project.classifier.toUpperCase()) 44 isReleaseBuild = "RELEASE".equals(project.classifier.toUpperCase())
43 mavenRepo = project.isReleaseBuild ? "mavenUrl" : "mavenSnapshotUrl" 45 mavenRepo = project.isReleaseBuild ? "mavenUrl" : "mavenSnapshotUrl"
  46 + brand = isJenkins ? "${project.mcVersion}-SNAPSHOT-r${System.env.GIT_COMMIT.take(7).toUpperCase()}-b${System.env.BUILD_NUMBER}-${System.env.BUILD_ID}" : ""
44 47
45 // Extended project information 48 // Extended project information
46 projectName = 'LiteLoader' 49 projectName = 'LiteLoader'
@@ -68,9 +71,15 @@ repositories { @@ -68,9 +71,15 @@ repositories {
68 } 71 }
69 72
70 dependencies { 73 dependencies {
71 - compile 'org.spongepowered:mixin:0.4.11-SNAPSHOT'  
72 - compile 'com.google.guava:guava:17.0'  
73 - compile 'com.google.code.gson:gson:2.2.4' 74 +// compile 'org.ow2.asm:asm-debug-all:5.0.3'
  75 + compile('org.spongepowered:mixin:0.5.5-SNAPSHOT') {
  76 + exclude module: 'asm-commons'
  77 + exclude module: 'asm-tree'
  78 + exclude module: 'launchwrapper'
  79 + exclude module: 'guava'
  80 + }
  81 +// compile 'com.google.guava:guava:17.0'
  82 +// compile 'com.google.code.gson:gson:2.2.4'
74 } 83 }
75 84
76 minecraft { 85 minecraft {
@@ -131,6 +140,14 @@ afterEvaluate { @@ -131,6 +140,14 @@ afterEvaluate {
131 mc.replacer.putReplacement '{RUN_CLIENT_TWEAKER}', minecraft.tweakClass 140 mc.replacer.putReplacement '{RUN_CLIENT_TWEAKER}', minecraft.tweakClass
132 } 141 }
133 142
  143 +processResources {
  144 + inputs.property "brand", project.brand
  145 + from (sourceSets.main.resources.srcDirs) {
  146 + include 'liteloader.properties'
  147 + filter { line -> line.startsWith('brand=') ? line + project.brand : line }
  148 + }
  149 +}
  150 +
134 // manifest entries for all jars 151 // manifest entries for all jars
135 def jarManifest = { 152 def jarManifest = {
136 mainAttributes ( 153 mainAttributes (
@@ -146,7 +163,7 @@ jar { @@ -146,7 +163,7 @@ jar {
146 doFirst { 163 doFirst {
147 // Seriously forge? 164 // Seriously forge?
148 ant.replace( 165 ant.replace(
149 - file: sourceSets.main.refMapFile, 166 + file: file("${compileJava.temporaryDir}/${sourceSets.main.refMap}"),
150 token: "func_72355_a(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;)V", 167 token: "func_72355_a(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;)V",
151 value: "initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V" 168 value: "initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V"
152 ) 169 )
@@ -284,7 +301,20 @@ uploadArchives { @@ -284,7 +301,20 @@ uploadArchives {
284 url 'http://develop.liteloader.com/liteloader/LiteLoader/issues' 301 url 'http://develop.liteloader.com/liteloader/LiteLoader/issues'
285 } 302 }
286 } 303 }
  304 + whenConfigured {
  305 + dependencies = dependencies.findAll {
  306 + !it.artifactId.contains('mixin')
  307 + }
  308 + }
287 } 309 }
288 } 310 }
289 } 311 }
290 } 312 }
  313 +
  314 +install.repositories.mavenInstaller.pom {
  315 + whenConfigured {
  316 + dependencies = dependencies.findAll {
  317 + !it.artifactId.contains('mixin')
  318 + }
  319 + }
  320 +}
checkstyle.xml
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 This configuration file was written by the eclipse-cs plugin configuration editor 5 This configuration file was written by the eclipse-cs plugin configuration editor
6 --> 6 -->
7 <!-- 7 <!--
8 - Checkstyle-Configuration: LiteLoader Style 8 + Checkstyle-Configuration: LiteLoader
9 Description: none 9 Description: none
10 --> 10 -->
11 <module name="Checker"> 11 <module name="Checker">
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/> 36 <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
37 </module> 37 </module>
38 <module name="MemberName"> 38 <module name="MemberName">
39 - <property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/> 39 + <property name="format" value="^[a-z]([a-zA-Z0-9_]*)?$"/>
40 <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/> 40 <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
41 </module> 41 </module>
42 <module name="ParameterName"> 42 <module name="ParameterName">
docs/logo.png 0 → 100644

6.6 KB

gradle.properties
@@ -5,6 +5,6 @@ description=LiteLoader @@ -5,6 +5,6 @@ description=LiteLoader
5 url=http://www.liteloader.com 5 url=http://www.liteloader.com
6 organization=LiteLoader 6 organization=LiteLoader
7 buildType=SNAPSHOT 7 buildType=SNAPSHOT
8 -buildVersion=1.8  
9 -mcVersion=1.8  
10 -mcMappings=snapshot_20151124  
11 \ No newline at end of file 8 \ No newline at end of file
  9 +buildVersion=1.9
  10 +mcVersion=1.9
  11 +mcMappings=snapshot_20160411
12 \ No newline at end of file 12 \ No newline at end of file
src/client/java/com/mumfrey/liteloader/ChatFilter.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue; 8 import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue;
4 9
5 -import net.minecraft.util.IChatComponent; 10 +import net.minecraft.util.text.ITextComponent;
6 11
7 12
8 /** 13 /**
@@ -23,5 +28,5 @@ public interface ChatFilter extends LiteMod @@ -23,5 +28,5 @@ public interface ChatFilter extends LiteMod
23 * 28 *
24 * @return True to keep the packet, false to discard 29 * @return True to keep the packet, false to discard
25 */ 30 */
26 - public abstract boolean onChat(IChatComponent chat, String message, ReturnValue<IChatComponent> newMessage); 31 + public abstract boolean onChat(ITextComponent chat, String message, ReturnValue<ITextComponent> newMessage);
27 } 32 }
src/client/java/com/mumfrey/liteloader/ChatListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 -import net.minecraft.util.IChatComponent; 8 +import net.minecraft.util.text.ITextComponent;
4 9
5 10
6 /** 11 /**
@@ -13,8 +18,8 @@ public interface ChatListener extends LiteMod @@ -13,8 +18,8 @@ public interface ChatListener extends LiteMod
13 /** 18 /**
14 * Handle an inbound message 19 * Handle an inbound message
15 * 20 *
16 - * @param chat IChatComponent parsed from the chat packet 21 + * @param chat ITextComponent parsed from the chat packet
17 * @param message Chat message parsed from the chat message component 22 * @param message Chat message parsed from the chat message component
18 */ 23 */
19 - public abstract void onChat(IChatComponent chat, String message); 24 + public abstract void onChat(ITextComponent chat, String message);
20 } 25 }
src/client/java/com/mumfrey/liteloader/ChatRenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.gui.GuiNewChat; 8 import net.minecraft.client.gui.GuiNewChat;
src/client/java/com/mumfrey/liteloader/EntityRenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.renderer.entity.Render; 8 import net.minecraft.client.renderer.entity.Render;
@@ -22,7 +27,8 @@ public interface EntityRenderListener extends LiteMod @@ -22,7 +27,8 @@ public interface EntityRenderListener extends LiteMod
22 * @param yaw 27 * @param yaw
23 * @param partialTicks 28 * @param partialTicks
24 */ 29 */
25 - public abstract void onRenderEntity(Render render, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks); 30 + public abstract void onRenderEntity(Render<? extends Entity> render, Entity entity, double xPos, double yPos, double zPos, float yaw,
  31 + float partialTicks);
26 32
27 /** 33 /**
28 * Called immediately following an entity being rendered 34 * Called immediately following an entity being rendered
@@ -35,5 +41,6 @@ public interface EntityRenderListener extends LiteMod @@ -35,5 +41,6 @@ public interface EntityRenderListener extends LiteMod
35 * @param yaw 41 * @param yaw
36 * @param partialTicks 42 * @param partialTicks
37 */ 43 */
38 - public abstract void onPostRenderEntity(Render render, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks); 44 + public abstract void onPostRenderEntity(Render<? extends Entity> render, Entity entity, double xPos, double yPos, double zPos, float yaw,
  45 + float partialTicks);
39 } 46 }
src/client/java/com/mumfrey/liteloader/FrameBufferListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.shader.Framebuffer; 8 import net.minecraft.client.shader.Framebuffer;
src/client/java/com/mumfrey/liteloader/GameLoopListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.Minecraft; 8 import net.minecraft.client.Minecraft;
src/client/java/com/mumfrey/liteloader/HUDRenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 /** 8 /**
src/client/java/com/mumfrey/liteloader/InitCompleteListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 -import net.minecraft.client.Minecraft;  
4 -  
5 import com.mumfrey.liteloader.core.LiteLoader; 8 import com.mumfrey.liteloader.core.LiteLoader;
6 9
  10 +import net.minecraft.client.Minecraft;
  11 +
7 /** 12 /**
8 * Interface for mods which need to initialise stuff once the game 13 * Interface for mods which need to initialise stuff once the game
9 * initialisation is completed, for example mods which need to register new 14 * initialisation is completed, for example mods which need to register new
src/client/java/com/mumfrey/liteloader/JoinGameListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
  8 +import com.mojang.realmsclient.dto.RealmsServer;
  9 +
3 import net.minecraft.client.multiplayer.ServerData; 10 import net.minecraft.client.multiplayer.ServerData;
4 import net.minecraft.network.INetHandler; 11 import net.minecraft.network.INetHandler;
5 -import net.minecraft.network.play.server.S01PacketJoinGame;  
6 -  
7 -import com.mojang.realmsclient.dto.RealmsServer; 12 +import net.minecraft.network.play.server.SPacketJoinGame;
8 13
9 14
10 /** 15 /**
@@ -25,5 +30,5 @@ public interface JoinGameListener extends LiteMod @@ -25,5 +30,5 @@ public interface JoinGameListener extends LiteMod
25 * @param realmsServer If connecting to a realm, a reference to the 30 * @param realmsServer If connecting to a realm, a reference to the
26 * RealmsServer object 31 * RealmsServer object
27 */ 32 */
28 - public abstract void onJoinGame(INetHandler netHandler, S01PacketJoinGame joinGamePacket, ServerData serverData, RealmsServer realmsServer); 33 + public abstract void onJoinGame(INetHandler netHandler, SPacketJoinGame joinGamePacket, ServerData serverData, RealmsServer realmsServer);
29 } 34 }
src/client/java/com/mumfrey/liteloader/OutboundChatFilter.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 /** 8 /**
src/client/java/com/mumfrey/liteloader/OutboundChatListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 -import net.minecraft.network.play.client.C01PacketChatMessage; 8 +import net.minecraft.network.play.client.CPacketChatMessage;
4 9
5 /** 10 /**
6 * Interface for mods which want to monitor outbound chat 11 * Interface for mods which want to monitor outbound chat
@@ -16,5 +21,5 @@ public interface OutboundChatListener extends LiteMod @@ -16,5 +21,5 @@ public interface OutboundChatListener extends LiteMod
16 * @param packet 21 * @param packet
17 * @param message 22 * @param message
18 */ 23 */
19 - public abstract void onSendChatMessage(C01PacketChatMessage packet, String message); 24 + public abstract void onSendChatMessage(CPacketChatMessage packet, String message);
20 } 25 }
src/client/java/com/mumfrey/liteloader/PostLoginListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.network.login.INetHandlerLoginClient; 8 import net.minecraft.network.login.INetHandlerLoginClient;
4 -import net.minecraft.network.login.server.S02PacketLoginSuccess; 9 +import net.minecraft.network.login.server.SPacketLoginSuccess;
5 10
6 /** 11 /**
7 * 12 *
@@ -17,5 +22,5 @@ public interface PostLoginListener extends LiteMod @@ -17,5 +22,5 @@ public interface PostLoginListener extends LiteMod
17 * @param netHandler 22 * @param netHandler
18 * @param packet 23 * @param packet
19 */ 24 */
20 - public abstract void onPostLogin(INetHandlerLoginClient netHandler, S02PacketLoginSuccess packet); 25 + public abstract void onPostLogin(INetHandlerLoginClient netHandler, SPacketLoginSuccess packet);
21 } 26 }
src/client/java/com/mumfrey/liteloader/PostRenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 /** 8 /**
src/client/java/com/mumfrey/liteloader/PreRenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.renderer.RenderGlobal; 8 import net.minecraft.client.renderer.RenderGlobal;
src/client/java/com/mumfrey/liteloader/RenderListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.gui.GuiScreen; 8 import net.minecraft.client.gui.GuiScreen;
@@ -22,14 +27,6 @@ public interface RenderListener extends LiteMod @@ -22,14 +27,6 @@ public interface RenderListener extends LiteMod
22 public abstract void onRenderGui(GuiScreen currentScreen); 27 public abstract void onRenderGui(GuiScreen currentScreen);
23 28
24 /** 29 /**
25 - * Called when the world is rendered  
26 - *  
27 - * @deprecated Use PreRenderListener::onRenderWorld(F)V instead  
28 - */  
29 - @Deprecated  
30 - public abstract void onRenderWorld();  
31 -  
32 - /**  
33 * Called immediately after the world/camera transform is initialised 30 * Called immediately after the world/camera transform is initialised
34 */ 31 */
35 public abstract void onSetupCameraTransform(); 32 public abstract void onSetupCameraTransform();
src/client/java/com/mumfrey/liteloader/ScreenshotListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 -import net.minecraft.client.shader.Framebuffer;  
4 -import net.minecraft.util.IChatComponent;  
5 -  
6 import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue; 8 import com.mumfrey.liteloader.core.LiteLoaderEventBroker.ReturnValue;
7 9
  10 +import net.minecraft.client.shader.Framebuffer;
  11 +import net.minecraft.util.text.ITextComponent;
  12 +
8 /** 13 /**
9 * Interface for mods which want to handle or inhibit the saving of screenshots 14 * Interface for mods which want to handle or inhibit the saving of screenshots
10 * 15 *
@@ -24,5 +29,5 @@ public interface ScreenshotListener extends LiteMod @@ -24,5 +29,5 @@ public interface ScreenshotListener extends LiteMod
24 * @return FALSE to suspend further processing, or TRUE to allow processing 29 * @return FALSE to suspend further processing, or TRUE to allow processing
25 * to continue normally 30 * to continue normally
26 */ 31 */
27 - public boolean onSaveScreenshot(String screenshotName, int width, int height, Framebuffer fbo, ReturnValue<IChatComponent> message); 32 + public boolean onSaveScreenshot(String screenshotName, int width, int height, Framebuffer fbo, ReturnValue<ITextComponent> message);
28 } 33 }
src/client/java/com/mumfrey/liteloader/Tickable.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.Minecraft; 8 import net.minecraft.client.Minecraft;
src/client/java/com/mumfrey/liteloader/ViewportListener.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader; 6 package com.mumfrey.liteloader;
2 7
3 import net.minecraft.client.gui.ScaledResolution; 8 import net.minecraft.client.gui.ScaledResolution;
src/client/java/com/mumfrey/liteloader/client/ClientPluginChannelsClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import com.mumfrey.liteloader.client.ducks.IClientNetLoginHandler; 8 import com.mumfrey.liteloader.client.ducks.IClientNetLoginHandler;
@@ -9,11 +14,11 @@ import net.minecraft.network.INetHandler; @@ -9,11 +14,11 @@ import net.minecraft.network.INetHandler;
9 import net.minecraft.network.NetworkManager; 14 import net.minecraft.network.NetworkManager;
10 import net.minecraft.network.PacketBuffer; 15 import net.minecraft.network.PacketBuffer;
11 import net.minecraft.network.login.INetHandlerLoginClient; 16 import net.minecraft.network.login.INetHandlerLoginClient;
12 -import net.minecraft.network.login.server.S02PacketLoginSuccess; 17 +import net.minecraft.network.login.server.SPacketLoginSuccess;
13 import net.minecraft.network.play.INetHandlerPlayClient; 18 import net.minecraft.network.play.INetHandlerPlayClient;
14 -import net.minecraft.network.play.client.C17PacketCustomPayload;  
15 -import net.minecraft.network.play.server.S01PacketJoinGame;  
16 -import net.minecraft.network.play.server.S3FPacketCustomPayload; 19 +import net.minecraft.network.play.client.CPacketCustomPayload;
  20 +import net.minecraft.network.play.server.SPacketCustomPayload;
  21 +import net.minecraft.network.play.server.SPacketJoinGame;
17 22
18 /** 23 /**
19 * Handler for client plugin channels 24 * Handler for client plugin channels
@@ -26,7 +31,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels @@ -26,7 +31,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
26 * @param netHandler 31 * @param netHandler
27 * @param loginPacket 32 * @param loginPacket
28 */ 33 */
29 - void onPostLogin(INetHandlerLoginClient netHandler, S02PacketLoginSuccess loginPacket) 34 + void onPostLogin(INetHandlerLoginClient netHandler, SPacketLoginSuccess loginPacket)
30 { 35 {
31 this.clearPluginChannels(netHandler); 36 this.clearPluginChannels(netHandler);
32 } 37 }
@@ -35,7 +40,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels @@ -35,7 +40,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
35 * @param netHandler 40 * @param netHandler
36 * @param loginPacket 41 * @param loginPacket
37 */ 42 */
38 - void onJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) 43 + void onJoinGame(INetHandler netHandler, SPacketJoinGame loginPacket)
39 { 44 {
40 this.sendRegisteredPluginChannels(netHandler); 45 this.sendRegisteredPluginChannels(netHandler);
41 } 46 }
@@ -46,7 +51,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels @@ -46,7 +51,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
46 * @param customPayload 51 * @param customPayload
47 */ 52 */
48 @Override 53 @Override
49 - public void onPluginChannelMessage(S3FPacketCustomPayload customPayload) 54 + public void onPluginChannelMessage(SPacketCustomPayload customPayload)
50 { 55 {
51 if (customPayload != null && customPayload.getChannelName() != null) 56 if (customPayload != null && customPayload.getChannelName() != null)
52 { 57 {
@@ -67,11 +72,11 @@ public class ClientPluginChannelsClient extends ClientPluginChannels @@ -67,11 +72,11 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
67 if (netHandler instanceof INetHandlerLoginClient) 72 if (netHandler instanceof INetHandlerLoginClient)
68 { 73 {
69 NetworkManager networkManager = ((IClientNetLoginHandler)netHandler).getNetMgr(); 74 NetworkManager networkManager = ((IClientNetLoginHandler)netHandler).getNetMgr();
70 - networkManager.sendPacket(new C17PacketCustomPayload(CHANNEL_REGISTER, registrationData)); 75 + networkManager.sendPacket(new CPacketCustomPayload(CHANNEL_REGISTER, registrationData));
71 } 76 }
72 else if (netHandler instanceof INetHandlerPlayClient) 77 else if (netHandler instanceof INetHandlerPlayClient)
73 { 78 {
74 - ClientPluginChannelsClient.dispatch(new C17PacketCustomPayload(CHANNEL_REGISTER, registrationData)); 79 + ClientPluginChannelsClient.dispatch(new CPacketCustomPayload(CHANNEL_REGISTER, registrationData));
75 } 80 }
76 } 81 }
77 82
@@ -95,14 +100,14 @@ public class ClientPluginChannelsClient extends ClientPluginChannels @@ -95,14 +100,14 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
95 throw new UnregisteredChannelException(channel); 100 throw new UnregisteredChannelException(channel);
96 } 101 }
97 102
98 - C17PacketCustomPayload payload = new C17PacketCustomPayload(channel, data); 103 + CPacketCustomPayload payload = new CPacketCustomPayload(channel, data);
99 return ClientPluginChannelsClient.dispatch(payload); 104 return ClientPluginChannelsClient.dispatch(payload);
100 } 105 }
101 106
102 /** 107 /**
103 * @param payload 108 * @param payload
104 */ 109 */
105 - static boolean dispatch(C17PacketCustomPayload payload) 110 + static boolean dispatch(CPacketCustomPayload payload)
106 { 111 {
107 try 112 try
108 { 113 {
src/client/java/com/mumfrey/liteloader/client/ClientProxy.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import java.io.File; 8 import java.io.File;
@@ -16,7 +21,7 @@ import net.minecraft.client.renderer.entity.RenderManager; @@ -16,7 +21,7 @@ import net.minecraft.client.renderer.entity.RenderManager;
16 import net.minecraft.client.shader.Framebuffer; 21 import net.minecraft.client.shader.Framebuffer;
17 import net.minecraft.entity.Entity; 22 import net.minecraft.entity.Entity;
18 import net.minecraft.server.integrated.IntegratedServer; 23 import net.minecraft.server.integrated.IntegratedServer;
19 -import net.minecraft.util.IChatComponent; 24 +import net.minecraft.util.text.ITextComponent;
20 import net.minecraft.world.WorldSettings; 25 import net.minecraft.world.WorldSettings;
21 26
22 /** 27 /**
@@ -165,18 +170,20 @@ public abstract class ClientProxy extends Proxy @@ -165,18 +170,20 @@ public abstract class ClientProxy extends Proxy
165 ClientProxy.broker.onRenderTerrain(partialTicks, pass, timeSlice); 170 ClientProxy.broker.onRenderTerrain(partialTicks, pass, timeSlice);
166 } 171 }
167 172
168 - public static void onSaveScreenshot(CallbackInfoReturnable<IChatComponent> ci, File gameDir, String name, int width, int height, 173 + public static void onSaveScreenshot(CallbackInfoReturnable<ITextComponent> ci, File gameDir, String name, int width, int height,
169 Framebuffer fbo) 174 Framebuffer fbo)
170 { 175 {
171 ClientProxy.broker.onScreenshot(ci, name, width, height, fbo); 176 ClientProxy.broker.onScreenshot(ci, name, width, height, fbo);
172 } 177 }
173 178
174 - public static void onRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks) 179 + public static <T extends Entity> void onRenderEntity(RenderManager source, Render<T> render, T entity, double x, double y, double z,
  180 + float yaw, float pTicks)
175 { 181 {
176 ClientProxy.broker.onRenderEntity(source, entity, x, y, z, yaw, pTicks, render); 182 ClientProxy.broker.onRenderEntity(source, entity, x, y, z, yaw, pTicks, render);
177 } 183 }
178 184
179 - public static void onPostRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks) 185 + public static <T extends Entity> void onPostRenderEntity(RenderManager source, Render<T> render, T entity, double x, double y, double z,
  186 + float yaw, float pTicks)
180 { 187 {
181 ClientProxy.broker.onPostRenderEntity(source, entity, x, y, z, yaw, pTicks, render); 188 ClientProxy.broker.onPostRenderEntity(source, entity, x, y, z, yaw, pTicks, render);
182 } 189 }
src/client/java/com/mumfrey/liteloader/client/GameEngineClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
  8 +import java.util.ArrayList;
3 import java.util.Arrays; 9 import java.util.Arrays;
4 -import java.util.LinkedList;  
5 import java.util.List; 10 import java.util.List;
6 11
  12 +import com.mumfrey.liteloader.client.overlays.IMinecraft;
  13 +import com.mumfrey.liteloader.common.GameEngine;
  14 +import com.mumfrey.liteloader.common.Resources;
  15 +
7 import net.minecraft.client.Minecraft; 16 import net.minecraft.client.Minecraft;
8 import net.minecraft.client.audio.SoundHandler; 17 import net.minecraft.client.audio.SoundHandler;
9 import net.minecraft.client.gui.GuiNewChat; 18 import net.minecraft.client.gui.GuiNewChat;
@@ -14,10 +23,6 @@ import net.minecraft.client.settings.KeyBinding; @@ -14,10 +23,6 @@ import net.minecraft.client.settings.KeyBinding;
14 import net.minecraft.profiler.Profiler; 23 import net.minecraft.profiler.Profiler;
15 import net.minecraft.server.integrated.IntegratedServer; 24 import net.minecraft.server.integrated.IntegratedServer;
16 25
17 -import com.mumfrey.liteloader.client.overlays.IMinecraft;  
18 -import com.mumfrey.liteloader.common.GameEngine;  
19 -import com.mumfrey.liteloader.common.Resources;  
20 -  
21 /** 26 /**
22 * 27 *
23 * @author Adam Mummery-Smith 28 * @author Adam Mummery-Smith
@@ -113,7 +118,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt; @@ -113,7 +118,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
113 118
114 public ScaledResolution getScaledResolution() 119 public ScaledResolution getScaledResolution()
115 { 120 {
116 - return new ScaledResolution(this.engine, this.engine.displayWidth, this.engine.displayHeight); 121 + return new ScaledResolution(this.engine);
117 } 122 }
118 123
119 public GuiNewChat getChatGUI() 124 public GuiNewChat getChatGUI()
@@ -142,7 +147,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt; @@ -142,7 +147,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
142 @Override 147 @Override
143 public List<KeyBinding> getKeyBindings() 148 public List<KeyBinding> getKeyBindings()
144 { 149 {
145 - LinkedList<KeyBinding> keyBindings = new LinkedList<KeyBinding>(); 150 + ArrayList<KeyBinding> keyBindings = new ArrayList<KeyBinding>();
146 keyBindings.addAll(Arrays.asList(this.engine.gameSettings.keyBindings)); 151 keyBindings.addAll(Arrays.asList(this.engine.gameSettings.keyBindings));
147 return keyBindings; 152 return keyBindings;
148 } 153 }
src/client/java/com/mumfrey/liteloader/client/LiteLoaderCoreProviderClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 -import net.minecraft.client.audio.SoundHandler;  
4 -import net.minecraft.client.resources.IResourceManager;  
5 -import net.minecraft.client.resources.IResourcePack;  
6 -import net.minecraft.client.resources.SimpleReloadableResourceManager;  
7 -import net.minecraft.network.INetHandler;  
8 -import net.minecraft.network.play.server.S01PacketJoinGame;  
9 -import net.minecraft.world.World;  
10 -  
11 import com.mumfrey.liteloader.api.CoreProvider; 8 import com.mumfrey.liteloader.api.CoreProvider;
12 import com.mumfrey.liteloader.common.GameEngine; 9 import com.mumfrey.liteloader.common.GameEngine;
13 import com.mumfrey.liteloader.common.Resources; 10 import com.mumfrey.liteloader.common.Resources;
@@ -16,6 +13,14 @@ import com.mumfrey.liteloader.core.LiteLoaderMods; @@ -16,6 +13,14 @@ import com.mumfrey.liteloader.core.LiteLoaderMods;
16 import com.mumfrey.liteloader.launch.LoaderProperties; 13 import com.mumfrey.liteloader.launch.LoaderProperties;
17 import com.mumfrey.liteloader.resources.InternalResourcePack; 14 import com.mumfrey.liteloader.resources.InternalResourcePack;
18 15
  16 +import net.minecraft.client.audio.SoundHandler;
  17 +import net.minecraft.client.resources.IResourceManager;
  18 +import net.minecraft.client.resources.IResourcePack;
  19 +import net.minecraft.client.resources.SimpleReloadableResourceManager;
  20 +import net.minecraft.network.INetHandler;
  21 +import net.minecraft.network.play.server.SPacketJoinGame;
  22 +import net.minecraft.world.World;
  23 +
19 /** 24 /**
20 * CoreProvider which fixes SoundManager derping up at startup 25 * CoreProvider which fixes SoundManager derping up at startup
21 * 26 *
@@ -85,7 +90,7 @@ public class LiteLoaderCoreProviderClient implements CoreProvider @@ -85,7 +90,7 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
85 } 90 }
86 91
87 @Override 92 @Override
88 - public void onJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket) 93 + public void onJoinGame(INetHandler netHandler, SPacketJoinGame loginPacket)
89 { 94 {
90 } 95 }
91 96
src/client/java/com/mumfrey/liteloader/client/LiteLoaderEventBrokerClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import org.lwjgl.input.Mouse; 8 import org.lwjgl.input.Mouse;
4 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
5 import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
6 11
7 -import com.mumfrey.liteloader.*; 12 +import com.mumfrey.liteloader.ChatRenderListener;
  13 +import com.mumfrey.liteloader.EntityRenderListener;
  14 +import com.mumfrey.liteloader.FrameBufferListener;
  15 +import com.mumfrey.liteloader.GameLoopListener;
  16 +import com.mumfrey.liteloader.HUDRenderListener;
  17 +import com.mumfrey.liteloader.InitCompleteListener;
  18 +import com.mumfrey.liteloader.OutboundChatFilter;
  19 +import com.mumfrey.liteloader.OutboundChatListener;
  20 +import com.mumfrey.liteloader.PostRenderListener;
  21 +import com.mumfrey.liteloader.PreRenderListener;
  22 +import com.mumfrey.liteloader.RenderListener;
  23 +import com.mumfrey.liteloader.ScreenshotListener;
  24 +import com.mumfrey.liteloader.Tickable;
  25 +import com.mumfrey.liteloader.ViewportListener;
8 import com.mumfrey.liteloader.client.overlays.IEntityRenderer; 26 import com.mumfrey.liteloader.client.overlays.IEntityRenderer;
9 import com.mumfrey.liteloader.client.overlays.IMinecraft; 27 import com.mumfrey.liteloader.client.overlays.IMinecraft;
10 import com.mumfrey.liteloader.common.LoadingProgress; 28 import com.mumfrey.liteloader.common.LoadingProgress;
@@ -28,10 +46,10 @@ import net.minecraft.client.resources.IResourceManager; @@ -28,10 +46,10 @@ import net.minecraft.client.resources.IResourceManager;
28 import net.minecraft.client.resources.IResourceManagerReloadListener; 46 import net.minecraft.client.resources.IResourceManagerReloadListener;
29 import net.minecraft.client.shader.Framebuffer; 47 import net.minecraft.client.shader.Framebuffer;
30 import net.minecraft.entity.Entity; 48 import net.minecraft.entity.Entity;
31 -import net.minecraft.network.play.client.C01PacketChatMessage; 49 +import net.minecraft.network.play.client.CPacketChatMessage;
32 import net.minecraft.server.integrated.IntegratedServer; 50 import net.minecraft.server.integrated.IntegratedServer;
33 -import net.minecraft.util.IChatComponent;  
34 import net.minecraft.util.Timer; 51 import net.minecraft.util.Timer;
  52 +import net.minecraft.util.text.ITextComponent;
35 53
36 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener 54 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener
37 { 55 {
@@ -406,7 +424,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -406,7 +424,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
406 Minecraft minecraft = this.engine.getClient(); 424 Minecraft minecraft = this.engine.getClient();
407 425
408 // Flag indicates whether we are in game at the moment 426 // Flag indicates whether we are in game at the moment
409 - Entity renderViewEntity = minecraft.getRenderViewEntity(); // TODO OBF MCPTEST func_175606_aa - getRenderViewEntity 427 + Entity renderViewEntity = minecraft.getRenderViewEntity();
410 boolean inGame = renderViewEntity != null && renderViewEntity.worldObj != null; 428 boolean inGame = renderViewEntity != null && renderViewEntity.worldObj != null;
411 429
412 this.profiler.startSection("loader"); 430 this.profiler.startSection("loader");
@@ -434,7 +452,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -434,7 +452,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
434 * @param packet 452 * @param packet
435 * @param message 453 * @param message
436 */ 454 */
437 - void onSendChatMessage(C01PacketChatMessage packet, String message) 455 + void onSendChatMessage(CPacketChatMessage packet, String message)
438 { 456 {
439 this.outboundChatListeners.all().onSendChatMessage(packet, message); 457 this.outboundChatListeners.all().onSendChatMessage(packet, message);
440 } 458 }
@@ -483,7 +501,6 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -483,7 +501,6 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
483 void onRenderWorld(float partialTicks, long timeSlice) 501 void onRenderWorld(float partialTicks, long timeSlice)
484 { 502 {
485 this.preRenderListeners.all().onRenderWorld(partialTicks); 503 this.preRenderListeners.all().onRenderWorld(partialTicks);
486 - this.renderListeners.all().onRenderWorld();  
487 } 504 }
488 505
489 /** 506 /**
@@ -523,9 +540,9 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -523,9 +540,9 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
523 * @param height 540 * @param height
524 * @param fbo 541 * @param fbo
525 */ 542 */
526 - void onScreenshot(CallbackInfoReturnable<IChatComponent> ci, String name, int width, int height, Framebuffer fbo) 543 + void onScreenshot(CallbackInfoReturnable<ITextComponent> ci, String name, int width, int height, Framebuffer fbo)
527 { 544 {
528 - ReturnValue<IChatComponent> ret = new ReturnValue<IChatComponent>(ci.getReturnValue()); 545 + ReturnValue<ITextComponent> ret = new ReturnValue<ITextComponent>(ci.getReturnValue());
529 546
530 if (!this.screenshotListeners.all().onSaveScreenshot(name, width, height, fbo, ret)) 547 if (!this.screenshotListeners.all().onSaveScreenshot(name, width, height, fbo, ret))
531 { 548 {
@@ -543,8 +560,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -543,8 +560,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
543 * @param partialTicks 560 * @param partialTicks
544 * @param render 561 * @param render
545 */ 562 */
546 - public void onRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,  
547 - Render render) 563 + public <T extends Entity> void onRenderEntity(RenderManager source, T entity, double xPos, double yPos, double zPos, float yaw,
  564 + float partialTicks, Render<T> render)
548 { 565 {
549 this.entityRenderListeners.all().onRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks); 566 this.entityRenderListeners.all().onRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
550 } 567 }
@@ -559,8 +576,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft @@ -559,8 +576,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
559 * @param partialTicks 576 * @param partialTicks
560 * @param render 577 * @param render
561 */ 578 */
562 - public void onPostRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,  
563 - Render render) 579 + public <T extends Entity> void onPostRenderEntity(RenderManager source, T entity, double xPos, double yPos, double zPos, float yaw,
  580 + float partialTicks, Render<T> render)
564 { 581 {
565 this.entityRenderListeners.all().onPostRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks); 582 this.entityRenderListeners.all().onPostRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
566 } 583 }
src/client/java/com/mumfrey/liteloader/client/LiteLoaderPanelManager.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 -import net.minecraft.client.Minecraft;  
4 -import net.minecraft.client.gui.GuiIngameMenu;  
5 -import net.minecraft.client.gui.GuiMainMenu;  
6 -import net.minecraft.client.gui.GuiOptions;  
7 -import net.minecraft.client.gui.GuiScreen;  
8 -import net.minecraft.client.resources.I18n;  
9 -  
10 import org.lwjgl.input.Keyboard; 8 import org.lwjgl.input.Keyboard;
11 9
12 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel; 10 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
@@ -20,6 +18,13 @@ import com.mumfrey.liteloader.launch.LoaderProperties; @@ -20,6 +18,13 @@ import com.mumfrey.liteloader.launch.LoaderProperties;
20 import com.mumfrey.liteloader.modconfig.ConfigManager; 18 import com.mumfrey.liteloader.modconfig.ConfigManager;
21 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 19 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
22 20
  21 +import net.minecraft.client.Minecraft;
  22 +import net.minecraft.client.gui.GuiIngameMenu;
  23 +import net.minecraft.client.gui.GuiMainMenu;
  24 +import net.minecraft.client.gui.GuiOptions;
  25 +import net.minecraft.client.gui.GuiScreen;
  26 +import net.minecraft.client.resources.I18n;
  27 +
23 /** 28 /**
24 * Observer which handles the display of the mod panel 29 * Observer which handles the display of the mod panel
25 * 30 *
src/client/java/com/mumfrey/liteloader/client/PacketEventsClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import com.mojang.realmsclient.dto.RealmsServer; 8 import com.mojang.realmsclient.dto.RealmsServer;
4 -import com.mumfrey.liteloader.*; 9 +import com.mumfrey.liteloader.ChatFilter;
  10 +import com.mumfrey.liteloader.ChatListener;
  11 +import com.mumfrey.liteloader.JoinGameListener;
  12 +import com.mumfrey.liteloader.PostLoginListener;
  13 +import com.mumfrey.liteloader.PreJoinGameListener;
5 import com.mumfrey.liteloader.common.ducks.IChatPacket; 14 import com.mumfrey.liteloader.common.ducks.IChatPacket;
6 import com.mumfrey.liteloader.common.transformers.PacketEventInfo; 15 import com.mumfrey.liteloader.common.transformers.PacketEventInfo;
7 import com.mumfrey.liteloader.core.ClientPluginChannels; 16 import com.mumfrey.liteloader.core.ClientPluginChannels;
@@ -21,14 +30,13 @@ import net.minecraft.client.Minecraft; @@ -21,14 +30,13 @@ import net.minecraft.client.Minecraft;
21 import net.minecraft.network.INetHandler; 30 import net.minecraft.network.INetHandler;
22 import net.minecraft.network.Packet; 31 import net.minecraft.network.Packet;
23 import net.minecraft.network.login.INetHandlerLoginClient; 32 import net.minecraft.network.login.INetHandlerLoginClient;
24 -import net.minecraft.network.login.server.S02PacketLoginSuccess; 33 +import net.minecraft.network.login.server.SPacketLoginSuccess;
25 import net.minecraft.network.play.INetHandlerPlayClient; 34 import net.minecraft.network.play.INetHandlerPlayClient;
26 -import net.minecraft.network.play.server.S01PacketJoinGame;  
27 -import net.minecraft.network.play.server.S02PacketChat;  
28 -import net.minecraft.server.MinecraftServer;  
29 -import net.minecraft.util.ChatComponentText;  
30 -import net.minecraft.util.IChatComponent; 35 +import net.minecraft.network.play.server.SPacketChat;
  36 +import net.minecraft.network.play.server.SPacketJoinGame;
31 import net.minecraft.util.IThreadListener; 37 import net.minecraft.util.IThreadListener;
  38 +import net.minecraft.util.text.ITextComponent;
  39 +import net.minecraft.util.text.TextComponentString;
32 40
33 /** 41 /**
34 * Client-side packet event handlers 42 * Client-side packet event handlers
@@ -107,7 +115,7 @@ public class PacketEventsClient extends PacketEvents @@ -107,7 +115,7 @@ public class PacketEventsClient extends PacketEvents
107 this.postLoginListeners.add(postLoginListener); 115 this.postLoginListeners.add(postLoginListener);
108 } 116 }
109 117
110 - public static void onJoinRealm(long serverId, RealmsServer server) 118 + public static void onJoinRealm(RealmsServer server)
111 { 119 {
112 PacketEventsClient.joiningRealm = server; 120 PacketEventsClient.joiningRealm = server;
113 } 121 }
@@ -115,22 +123,23 @@ public class PacketEventsClient extends PacketEvents @@ -115,22 +123,23 @@ public class PacketEventsClient extends PacketEvents
115 @Override 123 @Override
116 protected IThreadListener getPacketContextListener(Packets.Context context) 124 protected IThreadListener getPacketContextListener(Packets.Context context)
117 { 125 {
  126 + Minecraft minecraft = Minecraft.getMinecraft();
118 if (context == Packets.Context.SERVER) 127 if (context == Packets.Context.SERVER)
119 { 128 {
120 - return MinecraftServer.getServer(); 129 + return minecraft.getIntegratedServer();
121 } 130 }
122 131
123 - return Minecraft.getMinecraft(); 132 + return minecraft;
124 } 133 }
125 134
126 /* (non-Javadoc) 135 /* (non-Javadoc)
127 * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket( 136 * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(
128 * com.mumfrey.liteloader.common.transformers.PacketEventInfo, 137 * com.mumfrey.liteloader.common.transformers.PacketEventInfo,
129 * net.minecraft.network.INetHandler, 138 * net.minecraft.network.INetHandler,
130 - * net.minecraft.network.play.server.S01PacketJoinGame) 139 + * net.minecraft.network.play.server.SPacketJoinGame)
131 */ 140 */
132 @Override 141 @Override
133 - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet) 142 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, SPacketJoinGame packet)
134 { 143 {
135 if (this.preJoinGame(e, netHandler, packet)) 144 if (this.preJoinGame(e, netHandler, packet))
136 { 145 {
@@ -149,7 +158,7 @@ public class PacketEventsClient extends PacketEvents @@ -149,7 +158,7 @@ public class PacketEventsClient extends PacketEvents
149 * @param packet 158 * @param packet
150 * @throws EventCancellationException 159 * @throws EventCancellationException
151 */ 160 */
152 - private boolean preJoinGame(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet) throws EventCancellationException 161 + private boolean preJoinGame(PacketEventInfo<Packet<?>> e, INetHandler netHandler, SPacketJoinGame packet) throws EventCancellationException
153 { 162 {
154 if (!(netHandler instanceof INetHandlerPlayClient)) 163 if (!(netHandler instanceof INetHandlerPlayClient))
155 { 164 {
@@ -166,7 +175,7 @@ public class PacketEventsClient extends PacketEvents @@ -166,7 +175,7 @@ public class PacketEventsClient extends PacketEvents
166 * @param netHandler 175 * @param netHandler
167 * @param packet 176 * @param packet
168 */ 177 */
169 - private void postJoinGame(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet) 178 + private void postJoinGame(PacketEventInfo<Packet<?>> e, INetHandler netHandler, SPacketJoinGame packet)
170 { 179 {
171 this.joinGameListeners.all().onJoinGame(netHandler, packet, Minecraft.getMinecraft().getCurrentServerData(), PacketEventsClient.joiningRealm); 180 this.joinGameListeners.all().onJoinGame(netHandler, packet, Minecraft.getMinecraft().getCurrentServerData(), PacketEventsClient.joiningRealm);
172 PacketEventsClient.joiningRealm = null; 181 PacketEventsClient.joiningRealm = null;
@@ -185,7 +194,7 @@ public class PacketEventsClient extends PacketEvents @@ -185,7 +194,7 @@ public class PacketEventsClient extends PacketEvents
185 * net.minecraft.network.login.server.S02PacketLoginSuccess) 194 * net.minecraft.network.login.server.S02PacketLoginSuccess)
186 */ 195 */
187 @Override 196 @Override
188 - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet) 197 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, SPacketLoginSuccess packet)
189 { 198 {
190 if (netHandler instanceof INetHandlerLoginClient) 199 if (netHandler instanceof INetHandlerLoginClient)
191 { 200 {
@@ -208,21 +217,21 @@ public class PacketEventsClient extends PacketEvents @@ -208,21 +217,21 @@ public class PacketEventsClient extends PacketEvents
208 * net.minecraft.network.play.server.S02PacketChat) 217 * net.minecraft.network.play.server.S02PacketChat)
209 */ 218 */
210 @Override 219 @Override
211 - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet) 220 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, SPacketChat packet)
212 { 221 {
213 if (packet.getChatComponent() == null) 222 if (packet.getChatComponent() == null)
214 { 223 {
215 return; 224 return;
216 } 225 }
217 226
218 - IChatComponent originalChat = packet.getChatComponent();  
219 - IChatComponent chat = originalChat; 227 + ITextComponent originalChat = packet.getChatComponent();
  228 + ITextComponent chat = originalChat;
220 String message = chat.getFormattedText(); 229 String message = chat.getFormattedText();
221 230
222 // Chat filters get a stab at the chat first, if any filter returns false the chat is discarded 231 // Chat filters get a stab at the chat first, if any filter returns false the chat is discarded
223 for (ChatFilter chatFilter : this.chatFilters) 232 for (ChatFilter chatFilter : this.chatFilters)
224 { 233 {
225 - ReturnValue<IChatComponent> ret = new ReturnValue<IChatComponent>(); 234 + ReturnValue<ITextComponent> ret = new ReturnValue<ITextComponent>();
226 235
227 if (chatFilter.onChat(chat, message, ret)) 236 if (chatFilter.onChat(chat, message, ret))
228 { 237 {
@@ -231,7 +240,7 @@ public class PacketEventsClient extends PacketEvents @@ -231,7 +240,7 @@ public class PacketEventsClient extends PacketEvents
231 chat = ret.get(); 240 chat = ret.get();
232 if (chat == null) 241 if (chat == null)
233 { 242 {
234 - chat = new ChatComponentText(""); 243 + chat = new TextComponentString("");
235 } 244 }
236 message = chat.getFormattedText(); 245 message = chat.getFormattedText();
237 } 246 }
src/client/java/com/mumfrey/liteloader/client/ResourceObserver.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import java.io.File; 8 import java.io.File;
4 import java.util.HashMap; 9 import java.util.HashMap;
5 import java.util.Map; 10 import java.util.Map;
6 11
7 -import net.minecraft.client.resources.IResourceManager;  
8 -import net.minecraft.client.resources.IResourcePack;  
9 -  
10 import com.mumfrey.liteloader.LiteMod; 12 import com.mumfrey.liteloader.LiteMod;
11 import com.mumfrey.liteloader.api.ModLoadObserver; 13 import com.mumfrey.liteloader.api.ModLoadObserver;
12 import com.mumfrey.liteloader.common.Resources; 14 import com.mumfrey.liteloader.common.Resources;
@@ -17,6 +19,9 @@ import com.mumfrey.liteloader.resources.ModResourcePack; @@ -17,6 +19,9 @@ import com.mumfrey.liteloader.resources.ModResourcePack;
17 import com.mumfrey.liteloader.resources.ModResourcePackDir; 19 import com.mumfrey.liteloader.resources.ModResourcePackDir;
18 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 20 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
19 21
  22 +import net.minecraft.client.resources.IResourceManager;
  23 +import net.minecraft.client.resources.IResourcePack;
  24 +
20 /** 25 /**
21 * Observer which handles registering mods on the client as resource packs 26 * Observer which handles registering mods on the client as resource packs
22 * 27 *
src/client/java/com/mumfrey/liteloader/client/ResourcesClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import java.util.HashMap; 8 import java.util.HashMap;
4 import java.util.List; 9 import java.util.List;
5 import java.util.Map; 10 import java.util.Map;
6 11
7 -import net.minecraft.client.Minecraft;  
8 -import net.minecraft.client.resources.IResourceManager;  
9 -import net.minecraft.client.resources.IResourcePack;  
10 -  
11 import com.mumfrey.liteloader.client.overlays.IMinecraft; 12 import com.mumfrey.liteloader.client.overlays.IMinecraft;
12 import com.mumfrey.liteloader.common.LoadingProgress; 13 import com.mumfrey.liteloader.common.LoadingProgress;
13 import com.mumfrey.liteloader.common.Resources; 14 import com.mumfrey.liteloader.common.Resources;
14 15
  16 +import net.minecraft.client.Minecraft;
  17 +import net.minecraft.client.resources.IResourceManager;
  18 +import net.minecraft.client.resources.IResourcePack;
  19 +
15 public class ResourcesClient implements Resources<IResourceManager, IResourcePack> 20 public class ResourcesClient implements Resources<IResourceManager, IResourcePack>
16 { 21 {
17 private final Minecraft engine = Minecraft.getMinecraft(); 22 private final Minecraft engine = Minecraft.getMinecraft();
src/client/java/com/mumfrey/liteloader/client/SoundHandlerReloadInhibitor.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 import java.util.List; 8 import java.util.List;
src/client/java/com/mumfrey/liteloader/client/Translator.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client; 6 package com.mumfrey.liteloader.client;
2 7
3 -import net.minecraft.client.resources.I18n;  
4 -  
5 import com.mumfrey.liteloader.api.TranslationProvider; 8 import com.mumfrey.liteloader.api.TranslationProvider;
6 9
  10 +import net.minecraft.client.resources.I18n;
  11 +
7 public class Translator implements TranslationProvider 12 public class Translator implements TranslationProvider
8 { 13 {
9 /* (non-Javadoc) 14 /* (non-Javadoc)
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderBrandingProvider.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.api; 6 package com.mumfrey.liteloader.client.api;
2 7
3 import java.net.URI; 8 import java.net.URI;
4 9
5 -import net.minecraft.client.resources.I18n;  
6 -import net.minecraft.util.ResourceLocation;  
7 -  
8 import com.mumfrey.liteloader.api.BrandingProvider; 10 import com.mumfrey.liteloader.api.BrandingProvider;
9 import com.mumfrey.liteloader.client.util.render.IconAbsolute; 11 import com.mumfrey.liteloader.client.util.render.IconAbsolute;
10 import com.mumfrey.liteloader.core.LiteLoader; 12 import com.mumfrey.liteloader.core.LiteLoader;
11 import com.mumfrey.liteloader.util.render.Icon; 13 import com.mumfrey.liteloader.util.render.Icon;
12 14
  15 +import net.minecraft.client.resources.I18n;
  16 +import net.minecraft.util.ResourceLocation;
  17 +
13 /** 18 /**
14 * LiteLoader's branding provider 19 * LiteLoader's branding provider
15 * 20 *
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderCoreAPIClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.api; 6 package com.mumfrey.liteloader.client.api;
2 7
3 import java.util.List; 8 import java.util.List;
4 9
5 -import net.minecraft.client.Minecraft;  
6 -import net.minecraft.server.integrated.IntegratedServer;  
7 -  
8 import com.google.common.collect.ImmutableList; 10 import com.google.common.collect.ImmutableList;
9 import com.google.common.collect.ObjectArrays; 11 import com.google.common.collect.ObjectArrays;
10 import com.mumfrey.liteloader.api.CoreProvider; 12 import com.mumfrey.liteloader.api.CoreProvider;
@@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.ObjectFactory; @@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.ObjectFactory;
20 import com.mumfrey.liteloader.messaging.MessageBus; 22 import com.mumfrey.liteloader.messaging.MessageBus;
21 import com.mumfrey.liteloader.transformers.event.json.ModEvents; 23 import com.mumfrey.liteloader.transformers.event.json.ModEvents;
22 24
  25 +import net.minecraft.client.Minecraft;
  26 +import net.minecraft.server.integrated.IntegratedServer;
  27 +
23 /** 28 /**
24 * Client side of the core API 29 * Client side of the core API
25 * 30 *
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderModInfoDecorator.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.api; 6 package com.mumfrey.liteloader.client.api;
2 7
3 import java.util.List; 8 import java.util.List;
4 9
5 -import net.minecraft.client.resources.I18n;  
6 -  
7 import com.mumfrey.liteloader.api.ModInfoDecorator; 10 import com.mumfrey.liteloader.api.ModInfoDecorator;
8 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel; 11 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
9 import com.mumfrey.liteloader.client.gui.modlist.GuiModListPanel; 12 import com.mumfrey.liteloader.client.gui.modlist.GuiModListPanel;
@@ -12,6 +15,8 @@ import com.mumfrey.liteloader.client.util.render.IconAbsoluteClickable; @@ -12,6 +15,8 @@ import com.mumfrey.liteloader.client.util.render.IconAbsoluteClickable;
12 import com.mumfrey.liteloader.core.ModInfo; 15 import com.mumfrey.liteloader.core.ModInfo;
13 import com.mumfrey.liteloader.util.render.IconTextured; 16 import com.mumfrey.liteloader.util.render.IconTextured;
14 17
  18 +import net.minecraft.client.resources.I18n;
  19 +
15 /** 20 /**
16 * ModInfo decorator 21 * ModInfo decorator
17 * 22 *
src/client/java/com/mumfrey/liteloader/client/api/ObjectFactoryClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.api; 6 package com.mumfrey.liteloader.client.api;
2 7
3 -import net.minecraft.client.Minecraft;  
4 -import net.minecraft.client.gui.GuiScreen;  
5 -import net.minecraft.launchwrapper.Launch;  
6 -import net.minecraft.server.integrated.IntegratedServer;  
7 -  
8 -import com.mumfrey.liteloader.client.LiteLoaderEventBrokerClient;  
9 import com.mumfrey.liteloader.client.ClientPluginChannelsClient; 8 import com.mumfrey.liteloader.client.ClientPluginChannelsClient;
10 import com.mumfrey.liteloader.client.GameEngineClient; 9 import com.mumfrey.liteloader.client.GameEngineClient;
  10 +import com.mumfrey.liteloader.client.LiteLoaderEventBrokerClient;
11 import com.mumfrey.liteloader.client.LiteLoaderPanelManager; 11 import com.mumfrey.liteloader.client.LiteLoaderPanelManager;
12 import com.mumfrey.liteloader.client.PacketEventsClient; 12 import com.mumfrey.liteloader.client.PacketEventsClient;
13 import com.mumfrey.liteloader.client.gui.startup.LoadingBar; 13 import com.mumfrey.liteloader.client.gui.startup.LoadingBar;
14 import com.mumfrey.liteloader.common.GameEngine; 14 import com.mumfrey.liteloader.common.GameEngine;
15 import com.mumfrey.liteloader.core.ClientPluginChannels; 15 import com.mumfrey.liteloader.core.ClientPluginChannels;
16 -import com.mumfrey.liteloader.core.LiteLoaderEventBroker;  
17 import com.mumfrey.liteloader.core.LiteLoader; 16 import com.mumfrey.liteloader.core.LiteLoader;
  17 +import com.mumfrey.liteloader.core.LiteLoaderEventBroker;
18 import com.mumfrey.liteloader.core.PacketEvents; 18 import com.mumfrey.liteloader.core.PacketEvents;
19 import com.mumfrey.liteloader.core.ServerPluginChannels; 19 import com.mumfrey.liteloader.core.ServerPluginChannels;
20 -import com.mumfrey.liteloader.interfaces.PanelManager;  
21 import com.mumfrey.liteloader.interfaces.ObjectFactory; 20 import com.mumfrey.liteloader.interfaces.ObjectFactory;
  21 +import com.mumfrey.liteloader.interfaces.PanelManager;
22 import com.mumfrey.liteloader.launch.LoaderEnvironment; 22 import com.mumfrey.liteloader.launch.LoaderEnvironment;
23 import com.mumfrey.liteloader.launch.LoaderProperties; 23 import com.mumfrey.liteloader.launch.LoaderProperties;
24 import com.mumfrey.liteloader.permissions.PermissionsManagerClient; 24 import com.mumfrey.liteloader.permissions.PermissionsManagerClient;
@@ -26,6 +26,11 @@ import com.mumfrey.liteloader.permissions.PermissionsManagerServer; @@ -26,6 +26,11 @@ import com.mumfrey.liteloader.permissions.PermissionsManagerServer;
26 import com.mumfrey.liteloader.util.Input; 26 import com.mumfrey.liteloader.util.Input;
27 import com.mumfrey.liteloader.util.InputManager; 27 import com.mumfrey.liteloader.util.InputManager;
28 28
  29 +import net.minecraft.client.Minecraft;
  30 +import net.minecraft.client.gui.GuiScreen;
  31 +import net.minecraft.launchwrapper.Launch;
  32 +import net.minecraft.server.integrated.IntegratedServer;
  33 +
29 /** 34 /**
30 * Factory for lifetime loader objects for the client side 35 * Factory for lifetime loader objects for the client side
31 * 36 *
src/client/java/com/mumfrey/liteloader/client/ducks/IClientNetLoginHandler.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.ducks; 6 package com.mumfrey.liteloader.client.ducks;
2 7
3 import net.minecraft.network.NetworkManager; 8 import net.minecraft.network.NetworkManager;
src/client/java/com/mumfrey/liteloader/client/ducks/IFramebuffer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.ducks; 6 package com.mumfrey.liteloader.client.ducks;
2 7
3 public interface IFramebuffer 8 public interface IFramebuffer
src/client/java/com/mumfrey/liteloader/client/ducks/IIntIdentityHashBiMap.java 0 → 100644
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
  6 +package com.mumfrey.liteloader.client.ducks;
  7 +
  8 +public interface IIntIdentityHashBiMap<V>
  9 +{
  10 + public abstract void removeObject(V object);
  11 +}
src/client/java/com/mumfrey/liteloader/client/ducks/IMutableRegistry.java 0 → 100644
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
  6 +package com.mumfrey.liteloader.client.ducks;
  7 +
  8 +public interface IMutableRegistry<K, V>
  9 +{
  10 + public abstract V removeObjectFromRegistry(K key);
  11 +}
src/client/java/com/mumfrey/liteloader/client/ducks/INamespacedRegistry.java deleted 100644 → 0
1 -package com.mumfrey.liteloader.client.ducks;  
2 -  
3 -public interface INamespacedRegistry  
4 -{  
5 - public abstract IObjectIntIdentityMap getUnderlyingMap();  
6 -}  
src/client/java/com/mumfrey/liteloader/client/ducks/IObjectIntIdentityMap.java deleted 100644 → 0
1 -package com.mumfrey.liteloader.client.ducks;  
2 -  
3 -import java.util.IdentityHashMap;  
4 -import java.util.List;  
5 -  
6 -public interface IObjectIntIdentityMap  
7 -{  
8 - public abstract <V> IdentityHashMap<V, Integer> getIdentityMap();  
9 -  
10 - public abstract <V> List<V> getObjectList();  
11 -}  
src/client/java/com/mumfrey/liteloader/client/ducks/IRegistrySimple.java deleted 100644 → 0
1 -package com.mumfrey.liteloader.client.ducks;  
2 -  
3 -import java.util.Map;  
4 -  
5 -public interface IRegistrySimple  
6 -{  
7 - public abstract <K, V> Map<K, V> getRegistryObjects();  
8 -}  
src/client/java/com/mumfrey/liteloader/client/ducks/IReloadable.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.ducks; 6 package com.mumfrey.liteloader.client.ducks;
2 7
3 import java.util.List; 8 import java.util.List;
src/client/java/com/mumfrey/liteloader/client/ducks/IRenderManager.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.ducks; 6 package com.mumfrey.liteloader.client.ducks;
2 7
3 import java.util.Map; 8 import java.util.Map;
@@ -7,5 +12,5 @@ import net.minecraft.entity.Entity; @@ -7,5 +12,5 @@ import net.minecraft.entity.Entity;
7 12
8 public interface IRenderManager 13 public interface IRenderManager
9 { 14 {
10 - public abstract Map<Class<? extends Entity>, Render> getRenderMap(); 15 + public abstract Map<Class<? extends Entity>, Render<? extends Entity>> getRenderMap();
11 } 16 }
src/client/java/com/mumfrey/liteloader/client/ducks/ITileEntityRendererDispatcher.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.ducks; 6 package com.mumfrey.liteloader.client.ducks;
2 7
3 import java.util.Map; 8 import java.util.Map;
@@ -7,5 +12,5 @@ import net.minecraft.tileentity.TileEntity; @@ -7,5 +12,5 @@ import net.minecraft.tileentity.TileEntity;
7 12
8 public interface ITileEntityRendererDispatcher 13 public interface ITileEntityRendererDispatcher
9 { 14 {
10 - public abstract Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap(); 15 + public abstract Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getSpecialRenderMap();
11 } 16 }
src/client/java/com/mumfrey/liteloader/client/gui/GuiCheckbox.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
4 -import net.minecraft.client.Minecraft;  
5 -import net.minecraft.client.gui.GuiButton;  
6 9
7 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider; 10 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
8 11
  12 +import net.minecraft.client.Minecraft;
  13 +import net.minecraft.client.gui.GuiButton;
  14 +
9 /** 15 /**
10 * Super-simple implementation of a checkbox control 16 * Super-simple implementation of a checkbox control
11 * 17 *
src/client/java/com/mumfrey/liteloader/client/gui/GuiHoverLabel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider; 8 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
src/client/java/com/mumfrey/liteloader/client/gui/GuiLiteLoaderPanel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
@@ -6,16 +11,6 @@ import java.io.IOException; @@ -6,16 +11,6 @@ import java.io.IOException;
6 import java.util.ArrayList; 11 import java.util.ArrayList;
7 import java.util.List; 12 import java.util.List;
8 13
9 -import net.minecraft.client.Minecraft;  
10 -import net.minecraft.client.gui.FontRenderer;  
11 -import net.minecraft.client.gui.GuiButton;  
12 -import net.minecraft.client.gui.GuiMainMenu;  
13 -import net.minecraft.client.gui.GuiScreen;  
14 -import net.minecraft.client.renderer.Tessellator;  
15 -import net.minecraft.client.renderer.WorldRenderer;  
16 -import net.minecraft.client.resources.I18n;  
17 -import net.minecraft.util.ResourceLocation;  
18 -  
19 import org.lwjgl.input.Keyboard; 14 import org.lwjgl.input.Keyboard;
20 import org.lwjgl.input.Mouse; 15 import org.lwjgl.input.Mouse;
21 16
@@ -35,6 +30,16 @@ import com.mumfrey.liteloader.modconfig.ConfigManager; @@ -35,6 +30,16 @@ import com.mumfrey.liteloader.modconfig.ConfigManager;
35 import com.mumfrey.liteloader.modconfig.ConfigPanel; 30 import com.mumfrey.liteloader.modconfig.ConfigPanel;
36 import com.mumfrey.liteloader.util.render.Icon; 31 import com.mumfrey.liteloader.util.render.Icon;
37 32
  33 +import net.minecraft.client.Minecraft;
  34 +import net.minecraft.client.gui.FontRenderer;
  35 +import net.minecraft.client.gui.GuiButton;
  36 +import net.minecraft.client.gui.GuiMainMenu;
  37 +import net.minecraft.client.gui.GuiScreen;
  38 +import net.minecraft.client.renderer.Tessellator;
  39 +import net.minecraft.client.renderer.VertexBuffer;
  40 +import net.minecraft.client.resources.I18n;
  41 +import net.minecraft.util.ResourceLocation;
  42 +
38 /** 43 /**
39 * GUI screen which displays info about loaded mods and also allows them to be 44 * 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 45 * enabled and disabled. An instance of this class is created every time the
@@ -280,7 +285,6 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -280,7 +285,6 @@ public class GuiLiteLoaderPanel extends GuiScreen
280 /* (non-Javadoc) 285 /* (non-Javadoc)
281 * @see net.minecraft.client.gui.GuiScreen#initGui() 286 * @see net.minecraft.client.gui.GuiScreen#initGui()
282 */ 287 */
283 - @SuppressWarnings("unchecked")  
284 @Override 288 @Override
285 public void initGui() 289 public void initGui()
286 { 290 {
@@ -790,12 +794,12 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -790,12 +794,12 @@ public class GuiLiteLoaderPanel extends GuiScreen
790 glColor4f(1.0F, 1.0F, 1.0F, alpha); 794 glColor4f(1.0F, 1.0F, 1.0F, alpha);
791 795
792 Tessellator tessellator = Tessellator.getInstance(); 796 Tessellator tessellator = Tessellator.getInstance();
793 - WorldRenderer worldRenderer = tessellator.getWorldRenderer();  
794 - worldRenderer.startDrawingQuads();  
795 - worldRenderer.addVertexWithUV(x + 0, y + height, 0, u , v2);  
796 - worldRenderer.addVertexWithUV(x + width, y + height, 0, u2, v2);  
797 - worldRenderer.addVertexWithUV(x + width, y + 0, 0, u2, v );  
798 - worldRenderer.addVertexWithUV(x + 0, y + 0, 0, u , v ); 797 + VertexBuffer buf = tessellator.getBuffer();
  798 + buf.begin(GL_QUADS, VF_POSITION_TEX);
  799 + buf.pos(x + 0, y + height, 0).tex(u , v2).endVertex();
  800 + buf.pos(x + width, y + height, 0).tex(u2, v2).endVertex();
  801 + buf.pos(x + width, y + 0, 0).tex(u2, v ).endVertex();
  802 + buf.pos(x + 0, y + 0, 0).tex(u , v ).endVertex();
799 tessellator.draw(); 803 tessellator.draw();
800 804
801 glDisableBlend(); 805 glDisableBlend();
@@ -812,4 +816,4 @@ public class GuiLiteLoaderPanel extends GuiScreen @@ -812,4 +816,4 @@ public class GuiLiteLoaderPanel extends GuiScreen
812 { 816 {
813 glDrawTexturedRect(x, y, icon.getIconWidth(), icon.getIconHeight(), icon.getMinU(), icon.getMinV(), icon.getMaxU(), icon.getMaxV(), alpha); 817 glDrawTexturedRect(x, y, icon.getIconWidth(), icon.getIconHeight(), icon.getMinU(), icon.getMinV(), icon.getMaxU(), icon.getMaxV(), alpha);
814 } 818 }
815 -}  
816 \ No newline at end of file 819 \ No newline at end of file
  820 +}
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
4 9
5 -import java.util.LinkedList; 10 +import java.util.ArrayList;
6 import java.util.List; 11 import java.util.List;
7 12
  13 +import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
  14 +
8 import net.minecraft.client.Minecraft; 15 import net.minecraft.client.Minecraft;
9 import net.minecraft.client.gui.Gui; 16 import net.minecraft.client.gui.Gui;
10 import net.minecraft.client.gui.GuiButton; 17 import net.minecraft.client.gui.GuiButton;
11 18
12 -import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;  
13 -  
14 /** 19 /**
15 * Base class for panels 20 * Base class for panels
16 * 21 *
@@ -30,7 +35,7 @@ public abstract class GuiPanel extends Gui @@ -30,7 +35,7 @@ public abstract class GuiPanel extends Gui
30 /** 35 /**
31 * Buttons 36 * Buttons
32 */ 37 */
33 - protected List<GuiButton> controls = new LinkedList<GuiButton>(); 38 + protected List<GuiButton> controls = new ArrayList<GuiButton>();
34 39
35 /** 40 /**
36 * Current available width 41 * Current available width
@@ -100,7 +105,9 @@ public abstract class GuiPanel extends Gui @@ -100,7 +105,9 @@ public abstract class GuiPanel extends Gui
100 void draw(int mouseX, int mouseY, float partialTicks) 105 void draw(int mouseX, int mouseY, float partialTicks)
101 { 106 {
102 for (GuiButton control : this.controls) 107 for (GuiButton control : this.controls)
  108 + {
103 control.drawButton(this.mc, mouseX, mouseY); 109 control.drawButton(this.mc, mouseX, mouseY);
  110 + }
104 } 111 }
105 112
106 /** 113 /**
@@ -206,4 +213,4 @@ public abstract class GuiPanel extends Gui @@ -206,4 +213,4 @@ public abstract class GuiPanel extends Gui
206 glAlphaFunc(GL_GREATER, 0.1F); 213 glAlphaFunc(GL_GREATER, 0.1F);
207 glDisableBlend(); 214 glDisableBlend();
208 } 215 }
209 -}  
210 \ No newline at end of file 216 \ No newline at end of file
  217 +}
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelAbout.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import java.net.URI; 8 import java.net.URI;
@@ -6,12 +11,6 @@ import java.util.List; @@ -6,12 +11,6 @@ import java.util.List;
6 import java.util.Set; 11 import java.util.Set;
7 import java.util.TreeSet; 12 import java.util.TreeSet;
8 13
9 -import net.minecraft.client.Minecraft;  
10 -import net.minecraft.client.gui.FontRenderer;  
11 -import net.minecraft.client.gui.GuiButton;  
12 -import net.minecraft.client.resources.I18n;  
13 -import net.minecraft.util.ResourceLocation;  
14 -  
15 import org.lwjgl.input.Keyboard; 14 import org.lwjgl.input.Keyboard;
16 15
17 import com.mumfrey.liteloader.api.BrandingProvider; 16 import com.mumfrey.liteloader.api.BrandingProvider;
@@ -22,6 +21,12 @@ import com.mumfrey.liteloader.core.LiteLoader; @@ -22,6 +21,12 @@ import com.mumfrey.liteloader.core.LiteLoader;
22 import com.mumfrey.liteloader.util.SortableValue; 21 import com.mumfrey.liteloader.util.SortableValue;
23 import com.mumfrey.liteloader.util.render.Icon; 22 import com.mumfrey.liteloader.util.render.Icon;
24 23
  24 +import net.minecraft.client.Minecraft;
  25 +import net.minecraft.client.gui.FontRenderer;
  26 +import net.minecraft.client.gui.GuiButton;
  27 +import net.minecraft.client.resources.I18n;
  28 +import net.minecraft.util.ResourceLocation;
  29 +
25 /** 30 /**
26 * "About LiteLoader" panel which docks in the mod info screen and lists 31 * "About LiteLoader" panel which docks in the mod info screen and lists
27 * information about the installed APIs. 32 * information about the installed APIs.
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelConfigContainer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 9 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 -import net.minecraft.client.Minecraft;  
6 -import net.minecraft.client.gui.GuiButton;  
7 -import net.minecraft.client.resources.I18n;  
8 10
9 import com.mumfrey.liteloader.LiteMod; 11 import com.mumfrey.liteloader.LiteMod;
10 import com.mumfrey.liteloader.modconfig.ConfigPanel; 12 import com.mumfrey.liteloader.modconfig.ConfigPanel;
11 import com.mumfrey.liteloader.modconfig.ConfigPanelHost; 13 import com.mumfrey.liteloader.modconfig.ConfigPanelHost;
12 14
  15 +import net.minecraft.client.Minecraft;
  16 +import net.minecraft.client.gui.GuiButton;
  17 +import net.minecraft.client.resources.I18n;
  18 +
13 /** 19 /**
14 * Config panel container, this handles drawing the configuration panel chrome 20 * Config panel container, this handles drawing the configuration panel chrome
15 * and also hosts the configuration panels themselves to support scrolling and 21 * and also hosts the configuration panels themselves to support scrolling and
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelError.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import java.io.PrintWriter; 8 import java.io.PrintWriter;
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelLiteLoaderLog.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
@@ -6,18 +11,18 @@ import java.net.URI; @@ -6,18 +11,18 @@ import java.net.URI;
6 import java.util.ArrayList; 11 import java.util.ArrayList;
7 import java.util.List; 12 import java.util.List;
8 13
9 -import net.minecraft.client.Minecraft;  
10 -import net.minecraft.client.gui.GuiButton;  
11 -import net.minecraft.client.gui.ScaledResolution;  
12 -import net.minecraft.client.resources.I18n;  
13 -import net.minecraft.util.Session;  
14 -  
15 import org.lwjgl.input.Keyboard; 14 import org.lwjgl.input.Keyboard;
16 15
17 import com.mumfrey.liteloader.core.LiteLoader; 16 import com.mumfrey.liteloader.core.LiteLoader;
18 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 17 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
19 import com.mumfrey.liteloader.util.net.LiteLoaderLogUpload; 18 import com.mumfrey.liteloader.util.net.LiteLoaderLogUpload;
20 19
  20 +import net.minecraft.client.Minecraft;
  21 +import net.minecraft.client.gui.GuiButton;
  22 +import net.minecraft.client.gui.ScaledResolution;
  23 +import net.minecraft.client.resources.I18n;
  24 +import net.minecraft.util.Session;
  25 +
21 /** 26 /**
22 * 27 *
23 * @author Adam Mummery-Smith 28 * @author Adam Mummery-Smith
@@ -98,7 +103,7 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent @@ -98,7 +103,7 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
98 103
99 this.chkScale.checked = GuiPanelLiteLoaderLog.useNativeRes; 104 this.chkScale.checked = GuiPanelLiteLoaderLog.useNativeRes;
100 105
101 - ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); 106 + ScaledResolution res = new ScaledResolution(this.mc);
102 this.guiScale = res.getScaleFactor(); 107 this.guiScale = res.getScaleFactor();
103 108
104 this.scrollPane.setSizeAndPosition(MARGIN, TOP, this.width - (MARGIN * 2), this.height - TOP - BOTTOM); 109 this.scrollPane.setSizeAndPosition(MARGIN, TOP, this.width - (MARGIN * 2), this.height - TOP - BOTTOM);
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelMods.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
@@ -5,10 +10,6 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; @@ -5,10 +10,6 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 10
6 import java.util.List; 11 import java.util.List;
7 12
8 -import net.minecraft.client.Minecraft;  
9 -import net.minecraft.client.gui.GuiButton;  
10 -import net.minecraft.client.resources.I18n;  
11 -  
12 import org.lwjgl.input.Keyboard; 13 import org.lwjgl.input.Keyboard;
13 14
14 import com.mumfrey.liteloader.LiteMod; 15 import com.mumfrey.liteloader.LiteMod;
@@ -20,6 +21,10 @@ import com.mumfrey.liteloader.launch.LoaderEnvironment; @@ -20,6 +21,10 @@ import com.mumfrey.liteloader.launch.LoaderEnvironment;
20 import com.mumfrey.liteloader.modconfig.ConfigManager; 21 import com.mumfrey.liteloader.modconfig.ConfigManager;
21 import com.mumfrey.liteloader.modconfig.ConfigPanel; 22 import com.mumfrey.liteloader.modconfig.ConfigPanel;
22 23
  24 +import net.minecraft.client.Minecraft;
  25 +import net.minecraft.client.gui.GuiButton;
  26 +import net.minecraft.client.resources.I18n;
  27 +
23 /** 28 /**
24 * Mods panel 29 * Mods panel
25 * 30 *
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelSettings.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import org.lwjgl.input.Keyboard; 8 import org.lwjgl.input.Keyboard;
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelUpdateCheck.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import java.net.URI; 8 import java.net.URI;
4 9
5 -import net.minecraft.client.Minecraft;  
6 -import net.minecraft.client.gui.FontRenderer;  
7 -import net.minecraft.client.gui.GuiButton;  
8 -import net.minecraft.client.gui.ScaledResolution;  
9 -import net.minecraft.client.resources.I18n;  
10 -  
11 import org.lwjgl.input.Keyboard; 10 import org.lwjgl.input.Keyboard;
12 11
13 import com.mumfrey.liteloader.core.LiteLoaderUpdateSite; 12 import com.mumfrey.liteloader.core.LiteLoaderUpdateSite;
@@ -15,6 +14,12 @@ import com.mumfrey.liteloader.launch.ClassPathUtilities; @@ -15,6 +14,12 @@ import com.mumfrey.liteloader.launch.ClassPathUtilities;
15 import com.mumfrey.liteloader.launch.LoaderProperties; 14 import com.mumfrey.liteloader.launch.LoaderProperties;
16 import com.mumfrey.liteloader.update.UpdateSite; 15 import com.mumfrey.liteloader.update.UpdateSite;
17 16
  17 +import net.minecraft.client.Minecraft;
  18 +import net.minecraft.client.gui.FontRenderer;
  19 +import net.minecraft.client.gui.GuiButton;
  20 +import net.minecraft.client.gui.ScaledResolution;
  21 +import net.minecraft.client.resources.I18n;
  22 +
18 /** 23 /**
19 * "Check for updates" panel which docks in the mod info screen 24 * "Check for updates" panel which docks in the mod info screen
20 * 25 *
@@ -169,7 +174,7 @@ class GuiPanelUpdateCheck extends GuiPanel @@ -169,7 +174,7 @@ class GuiPanelUpdateCheck extends GuiPanel
169 { 174 {
170 this.updateForced = true; 175 this.updateForced = true;
171 this.parentScreen.setToggleable(false); 176 this.parentScreen.setToggleable(false);
172 - ScaledResolution sr = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); 177 + ScaledResolution sr = new ScaledResolution(this.mc);
173 this.parentScreen.setWorldAndResolution(this.mc, sr.getScaledWidth(), sr.getScaledHeight()); 178 this.parentScreen.setWorldAndResolution(this.mc, sr.getScaledWidth(), sr.getScaledHeight());
174 } 179 }
175 else 180 else
src/client/java/com/mumfrey/liteloader/client/gui/GuiScrollPanel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 9 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 -import net.minecraft.client.Minecraft;  
6 -import net.minecraft.client.gui.GuiButton;  
7 10
8 import org.lwjgl.input.Keyboard; 11 import org.lwjgl.input.Keyboard;
9 12
  13 +import net.minecraft.client.Minecraft;
  14 +import net.minecraft.client.gui.GuiButton;
  15 +
10 /** 16 /**
11 * Basic non-interactive scrollable panel using OpenGL clipping planes 17 * Basic non-interactive scrollable panel using OpenGL clipping planes
12 * 18 *
src/client/java/com/mumfrey/liteloader/client/gui/GuiSimpleScrollBar.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import net.minecraft.client.gui.Gui; 8 import net.minecraft.client.gui.Gui;
src/client/java/com/mumfrey/liteloader/client/gui/ScrollPanelContent.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui; 6 package com.mumfrey.liteloader.client.gui;
2 7
3 import net.minecraft.client.gui.GuiButton; 8 import net.minecraft.client.gui.GuiButton;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModInfoPanel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
4 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; 9 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 -import net.minecraft.client.Minecraft;  
6 -import net.minecraft.client.gui.FontRenderer;  
7 -import net.minecraft.client.gui.Gui;  
8 -import net.minecraft.client.resources.I18n;  
9 10
10 import com.google.common.base.Strings; 11 import com.google.common.base.Strings;
11 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider; 12 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
@@ -14,6 +15,11 @@ import com.mumfrey.liteloader.client.util.render.IconAbsolute; @@ -14,6 +15,11 @@ import com.mumfrey.liteloader.client.util.render.IconAbsolute;
14 import com.mumfrey.liteloader.core.ModInfo; 15 import com.mumfrey.liteloader.core.ModInfo;
15 import com.mumfrey.liteloader.util.render.IconTextured; 16 import com.mumfrey.liteloader.util.render.IconTextured;
16 17
  18 +import net.minecraft.client.Minecraft;
  19 +import net.minecraft.client.gui.FontRenderer;
  20 +import net.minecraft.client.gui.Gui;
  21 +import net.minecraft.client.resources.I18n;
  22 +
17 public class GuiModInfoPanel extends Gui 23 public class GuiModInfoPanel extends Gui
18 { 24 {
19 private static final int TITLE_COLOUR = GuiModListPanel.WHITE; 25 private static final int TITLE_COLOUR = GuiModListPanel.WHITE;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModListPanel.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
@@ -6,16 +11,16 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*; @@ -6,16 +11,16 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
6 import java.util.ArrayList; 11 import java.util.ArrayList;
7 import java.util.List; 12 import java.util.List;
8 13
9 -import net.minecraft.client.Minecraft;  
10 -import net.minecraft.client.gui.FontRenderer;  
11 -import net.minecraft.client.gui.Gui;  
12 -  
13 import com.mumfrey.liteloader.api.ModInfoDecorator; 14 import com.mumfrey.liteloader.api.ModInfoDecorator;
14 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel; 15 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
15 import com.mumfrey.liteloader.core.ModInfo; 16 import com.mumfrey.liteloader.core.ModInfo;
16 import com.mumfrey.liteloader.util.render.IconClickable; 17 import com.mumfrey.liteloader.util.render.IconClickable;
17 import com.mumfrey.liteloader.util.render.IconTextured; 18 import com.mumfrey.liteloader.util.render.IconTextured;
18 19
  20 +import net.minecraft.client.Minecraft;
  21 +import net.minecraft.client.gui.FontRenderer;
  22 +import net.minecraft.client.gui.Gui;
  23 +
19 public class GuiModListPanel extends Gui 24 public class GuiModListPanel extends Gui
20 { 25 {
21 static final int BLACK = 0xFF000000; 26 static final int BLACK = 0xFF000000;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/GuiModListPanelInvalid.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import java.util.List; 8 import java.util.List;
4 9
5 -import net.minecraft.client.gui.FontRenderer;  
6 -  
7 import com.mumfrey.liteloader.api.ModInfoDecorator; 10 import com.mumfrey.liteloader.api.ModInfoDecorator;
8 import com.mumfrey.liteloader.core.ModInfo; 11 import com.mumfrey.liteloader.core.ModInfo;
9 12
  13 +import net.minecraft.client.gui.FontRenderer;
  14 +
10 public class GuiModListPanelInvalid extends GuiModListPanel 15 public class GuiModListPanelInvalid extends GuiModListPanel
11 { 16 {
12 private static final int BAD_PANEL_HEIGHT = 22; 17 private static final int BAD_PANEL_HEIGHT = 22;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/ModList.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import java.util.ArrayList; 8 import java.util.ArrayList;
@@ -5,9 +10,6 @@ import java.util.List; @@ -5,9 +10,6 @@ import java.util.List;
5 import java.util.Map; 10 import java.util.Map;
6 import java.util.TreeMap; 11 import java.util.TreeMap;
7 12
8 -import net.minecraft.client.Minecraft;  
9 -import net.minecraft.client.resources.I18n;  
10 -  
11 import org.lwjgl.input.Keyboard; 13 import org.lwjgl.input.Keyboard;
12 14
13 import com.mumfrey.liteloader.LiteMod; 15 import com.mumfrey.liteloader.LiteMod;
@@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.LoadableMod; @@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.LoadableMod;
20 import com.mumfrey.liteloader.launch.LoaderEnvironment; 22 import com.mumfrey.liteloader.launch.LoaderEnvironment;
21 import com.mumfrey.liteloader.modconfig.ConfigManager; 23 import com.mumfrey.liteloader.modconfig.ConfigManager;
22 24
  25 +import net.minecraft.client.Minecraft;
  26 +import net.minecraft.client.resources.I18n;
  27 +
23 public class ModList 28 public class ModList
24 { 29 {
25 private final ModListContainer container; 30 private final ModListContainer container;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/ModListContainer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel; 8 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
src/client/java/com/mumfrey/liteloader/client/gui/modlist/ModListEntry.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.modlist; 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7
3 import java.util.List; 8 import java.util.List;
4 import java.util.Set; 9 import java.util.Set;
5 10
6 -import net.minecraft.client.gui.FontRenderer;  
7 -import net.minecraft.client.resources.I18n;  
8 -  
9 import com.mumfrey.liteloader.LiteMod; 11 import com.mumfrey.liteloader.LiteMod;
10 import com.mumfrey.liteloader.api.ModInfoDecorator; 12 import com.mumfrey.liteloader.api.ModInfoDecorator;
11 import com.mumfrey.liteloader.core.LiteLoaderMods; 13 import com.mumfrey.liteloader.core.LiteLoaderMods;
@@ -14,6 +16,9 @@ import com.mumfrey.liteloader.interfaces.Loadable; @@ -14,6 +16,9 @@ import com.mumfrey.liteloader.interfaces.Loadable;
14 import com.mumfrey.liteloader.interfaces.LoadableMod; 16 import com.mumfrey.liteloader.interfaces.LoadableMod;
15 import com.mumfrey.liteloader.launch.LoaderEnvironment; 17 import com.mumfrey.liteloader.launch.LoaderEnvironment;
16 18
  19 +import net.minecraft.client.gui.FontRenderer;
  20 +import net.minecraft.client.resources.I18n;
  21 +
17 /** 22 /**
18 * Represents a mod in the mod info screen, keeps track of mod information and 23 * Represents a mod in the mod info screen, keeps track of mod information and
19 * provides methods for displaying the mod in the mod list and drawing the 24 * provides methods for displaying the mod in the mod list and drawing the
src/client/java/com/mumfrey/liteloader/client/gui/startup/LoadingBar.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.gui.startup; 6 package com.mumfrey.liteloader.client.gui.startup;
2 7
3 import static com.mumfrey.liteloader.gl.GL.*; 8 import static com.mumfrey.liteloader.gl.GL.*;
@@ -10,11 +15,16 @@ import java.util.List; @@ -10,11 +15,16 @@ import java.util.List;
10 15
11 import javax.imageio.ImageIO; 16 import javax.imageio.ImageIO;
12 17
  18 +import org.lwjgl.opengl.Display;
  19 +
  20 +import com.mumfrey.liteloader.common.LoadingProgress;
  21 +import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
  22 +
13 import net.minecraft.client.Minecraft; 23 import net.minecraft.client.Minecraft;
14 import net.minecraft.client.gui.FontRenderer; 24 import net.minecraft.client.gui.FontRenderer;
15 import net.minecraft.client.gui.ScaledResolution; 25 import net.minecraft.client.gui.ScaledResolution;
16 import net.minecraft.client.renderer.Tessellator; 26 import net.minecraft.client.renderer.Tessellator;
17 -import net.minecraft.client.renderer.WorldRenderer; 27 +import net.minecraft.client.renderer.VertexBuffer;
18 import net.minecraft.client.renderer.texture.DynamicTexture; 28 import net.minecraft.client.renderer.texture.DynamicTexture;
19 import net.minecraft.client.renderer.texture.ITextureObject; 29 import net.minecraft.client.renderer.texture.ITextureObject;
20 import net.minecraft.client.renderer.texture.TextureManager; 30 import net.minecraft.client.renderer.texture.TextureManager;
@@ -23,11 +33,6 @@ import net.minecraft.client.resources.IResourceManager; @@ -23,11 +33,6 @@ import net.minecraft.client.resources.IResourceManager;
23 import net.minecraft.client.shader.Framebuffer; 33 import net.minecraft.client.shader.Framebuffer;
24 import net.minecraft.util.ResourceLocation; 34 import net.minecraft.util.ResourceLocation;
25 35
26 -import org.lwjgl.opengl.Display;  
27 -  
28 -import com.mumfrey.liteloader.common.LoadingProgress;  
29 -import com.mumfrey.liteloader.util.log.LiteLoaderLogger;  
30 -  
31 /** 36 /**
32 * Crappy implementation of a "Mojang Screen" loading bar 37 * Crappy implementation of a "Mojang Screen" loading bar
33 * 38 *
@@ -218,7 +223,7 @@ public class LoadingBar extends LoadingProgress @@ -218,7 +223,7 @@ public class LoadingBar extends LoadingProgress
218 } 223 }
219 } 224 }
220 225
221 - ScaledResolution scaledResolution = new ScaledResolution(this.minecraft, this.minecraft.displayWidth, this.minecraft.displayHeight); 226 + ScaledResolution scaledResolution = new ScaledResolution(this.minecraft);
222 int scaleFactor = scaledResolution.getScaleFactor(); 227 int scaleFactor = scaledResolution.getScaleFactor();
223 int scaledWidth = scaledResolution.getScaledWidth(); 228 int scaledWidth = scaledResolution.getScaledWidth();
224 int scaledHeight = scaledResolution.getScaledHeight(); 229 int scaledHeight = scaledResolution.getScaledHeight();
@@ -254,13 +259,13 @@ public class LoadingBar extends LoadingProgress @@ -254,13 +259,13 @@ public class LoadingBar extends LoadingProgress
254 259
255 this.textureManager.bindTexture(this.textureLocation); 260 this.textureManager.bindTexture(this.textureLocation);
256 Tessellator tessellator = Tessellator.getInstance(); 261 Tessellator tessellator = Tessellator.getInstance();
257 - WorldRenderer worldRenderer = tessellator.getWorldRenderer();  
258 - worldRenderer.startDrawingQuads();  
259 - worldRenderer.setColorOpaque_I(0xFFFFFFFF); // TODO OBF MCPTEST func_178991_c - setColorOpaque_I  
260 - worldRenderer.addVertexWithUV(0.0D, scaledHeight, 0.0D, 0.0D, 0.0D);  
261 - worldRenderer.addVertexWithUV(scaledWidth, scaledHeight, 0.0D, 0.0D, 0.0D);  
262 - worldRenderer.addVertexWithUV(scaledWidth, 0.0D, 0.0D, 0.0D, 0.0D);  
263 - worldRenderer.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D); 262 + VertexBuffer vertexBuffer = tessellator.getBuffer();
  263 + vertexBuffer.begin(GL_QUADS, VF_POSITION);
  264 + glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  265 + vertexBuffer.pos(0.0D, scaledHeight, 0.0D).endVertex();
  266 + vertexBuffer.pos(scaledWidth, scaledHeight, 0.0D).endVertex();
  267 + vertexBuffer.pos(scaledWidth, 0.0D, 0.0D).endVertex();
  268 + vertexBuffer.pos(0.0D, 0.0D, 0.0D).endVertex();
264 tessellator.draw(); 269 tessellator.draw();
265 270
266 glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 271 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -273,12 +278,11 @@ public class LoadingBar extends LoadingProgress @@ -273,12 +278,11 @@ public class LoadingBar extends LoadingProgress
273 int v2 = 256; 278 int v2 = 256;
274 279
275 float texMapScale = 0.00390625F; 280 float texMapScale = 0.00390625F;
276 - worldRenderer.startDrawingQuads();  
277 - worldRenderer.setColorOpaque_I(0xFFFFFFFF); // TODO OBF MCPTEST func_178991_c - setColorOpaque_I  
278 - worldRenderer.addVertexWithUV(left + 0, top + v2, 0.0D, (u1 + 0) * texMapScale, (v1 + v2) * texMapScale);  
279 - worldRenderer.addVertexWithUV(left + u2, top + v2, 0.0D, (u1 + u2) * texMapScale, (v1 + v2) * texMapScale);  
280 - worldRenderer.addVertexWithUV(left + u2, top + 0, 0.0D, (u1 + u2) * texMapScale, (v1 + 0) * texMapScale);  
281 - worldRenderer.addVertexWithUV(left + 0, top + 0, 0.0D, (u1 + 0) * texMapScale, (v1 + 0) * texMapScale); 281 + vertexBuffer.begin(GL_QUADS, VF_POSITION_TEX);
  282 + vertexBuffer.pos(left + 0, top + v2, 0.0D).tex((u1 + 0) * texMapScale, (v1 + v2) * texMapScale).endVertex();
  283 + vertexBuffer.pos(left + u2, top + v2, 0.0D).tex((u1 + u2) * texMapScale, (v1 + v2) * texMapScale).endVertex();
  284 + vertexBuffer.pos(left + u2, top + 0, 0.0D).tex((u1 + u2) * texMapScale, (v1 + 0) * texMapScale).endVertex();
  285 + vertexBuffer.pos(left + 0, top + 0, 0.0D).tex((u1 + 0) * texMapScale, (v1 + 0) * texMapScale).endVertex();
282 tessellator.draw(); 286 tessellator.draw();
283 287
284 glEnableTexture2D(); 288 glEnableTexture2D();
@@ -319,23 +323,25 @@ public class LoadingBar extends LoadingProgress @@ -319,23 +323,25 @@ public class LoadingBar extends LoadingProgress
319 // tessellator.addVertex(0.0D, scaledHeight - (scaledHeight / 3), 0.0D); 323 // tessellator.addVertex(0.0D, scaledHeight - (scaledHeight / 3), 0.0D);
320 // tessellator.draw(); 324 // tessellator.draw();
321 325
322 - worldRenderer.startDrawingQuads();  
323 - worldRenderer.setColorRGBA(this.barLuma, this.barLuma, this.barLuma, 128); // TODO OBF MCPTEST func_178961_b - setColorRGBA  
324 - worldRenderer.addVertex(0.0D, scaledHeight, 0.0D);  
325 - worldRenderer.addVertex(0.0D + scaledWidth, scaledHeight, 0.0D);  
326 - worldRenderer.addVertex(0.0D + scaledWidth, scaledHeight - barHeight, 0.0D);  
327 - worldRenderer.addVertex(0.0D, scaledHeight - barHeight, 0.0D); 326 + vertexBuffer.begin(GL_QUADS, VF_POSITION);
  327 + float luma = this.barLuma / 255.0F;
  328 + glColor4f(luma, luma, luma, 0.5F);
  329 + vertexBuffer.pos(0.0D, scaledHeight, 0.0D).endVertex();
  330 + vertexBuffer.pos(0.0D + scaledWidth, scaledHeight, 0.0D).endVertex();
  331 + vertexBuffer.pos(0.0D + scaledWidth, scaledHeight - barHeight, 0.0D).endVertex();
  332 + vertexBuffer.pos(0.0D, scaledHeight - barHeight, 0.0D).endVertex();
328 tessellator.draw(); 333 tessellator.draw();
329 334
330 barHeight -= 1; 335 barHeight -= 1;
331 336
332 - worldRenderer.startDrawingQuads();  
333 - worldRenderer.setColorRGBA(this.r2, this.g2, this.b2, 255); // TODO OBF MCPTEST func_178961_b - setColorRGBA  
334 - worldRenderer.addVertex(1.0D + barWidth * progress, scaledHeight - 1, 1.0D);  
335 - worldRenderer.addVertex(1.0D + barWidth * progress, scaledHeight - barHeight, 1.0D);  
336 - worldRenderer.setColorRGBA(0, 0, 0, 255); // TODO OBF MCPTEST func_178961_b - setColorRGBA  
337 - worldRenderer.addVertex(1.0D, scaledHeight - barHeight, 1.0D);  
338 - worldRenderer.addVertex(1.0D, scaledHeight - 1, 1.0D); 337 + vertexBuffer.begin(GL_QUADS, VF_POSITION_COLOR);
  338 + float r2 = this.r2 / 255.0F;
  339 + float g2 = this.g2 / 255.0F;
  340 + float b2 = this.b2 / 255.0F;
  341 + vertexBuffer.pos(1.0D + barWidth * progress, scaledHeight - 1, 1.0D).color(r2, g2, b2, 1.0F).endVertex();
  342 + vertexBuffer.pos(1.0D + barWidth * progress, scaledHeight - barHeight, 1.0D).color(r2, g2, b2, 1.0F).endVertex();
  343 + vertexBuffer.pos(1.0D, scaledHeight - barHeight, 1.0D).color(0.0F, 0.0F, 0.0F, 1.0F).endVertex();
  344 + vertexBuffer.pos(1.0D, scaledHeight - 1, 1.0D).color(0.0F, 0.0F, 0.0F, 1.0F).endVertex();
339 tessellator.draw(); 345 tessellator.draw();
340 346
341 glAlphaFunc(GL_GREATER, 0.1F); 347 glAlphaFunc(GL_GREATER, 0.1F);
@@ -349,7 +355,7 @@ public class LoadingBar extends LoadingProgress @@ -349,7 +355,7 @@ public class LoadingBar extends LoadingProgress
349 glAlphaFunc(GL_GREATER, 0.1F); 355 glAlphaFunc(GL_GREATER, 0.1F);
350 // glFlush(); 356 // glFlush();
351 357
352 - this.minecraft.updateDisplay(); // TODO OBF MCPTEST updateDisplay - func_175601_h 358 + this.minecraft.updateDisplay();
353 } 359 }
354 360
355 private void renderLogTail(int yPos) 361 private void renderLogTail(int yPos)
src/client/java/com/mumfrey/liteloader/client/mixin/MixinEntityPlayerSP.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
src/client/java/com/mumfrey/liteloader/client/mixin/MixinEntityRenderer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
  9 +import org.spongepowered.asm.mixin.Shadow;
4 import org.spongepowered.asm.mixin.injection.At; 10 import org.spongepowered.asm.mixin.injection.At;
5 -import org.spongepowered.asm.mixin.injection.Inject;  
6 import org.spongepowered.asm.mixin.injection.At.Shift; 11 import org.spongepowered.asm.mixin.injection.At.Shift;
  12 +import org.spongepowered.asm.mixin.injection.Inject;
7 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
8 14
9 import com.mumfrey.liteloader.client.ClientProxy; 15 import com.mumfrey.liteloader.client.ClientProxy;
  16 +import com.mumfrey.liteloader.client.overlays.IEntityRenderer;
10 17
11 import net.minecraft.client.renderer.EntityRenderer; 18 import net.minecraft.client.renderer.EntityRenderer;
12 import net.minecraft.client.renderer.RenderGlobal; 19 import net.minecraft.client.renderer.RenderGlobal;
  20 +import net.minecraft.util.ResourceLocation;
13 21
14 @Mixin(EntityRenderer.class) 22 @Mixin(EntityRenderer.class)
15 -public abstract class MixinEntityRenderer 23 +public abstract class MixinEntityRenderer implements IEntityRenderer
16 { 24 {
17 - @Inject(method = "updateCameraAndRender(F)V", at = @At( 25 + @Shadow private static ResourceLocation[] SHADERS_TEXTURES;
  26 + @Shadow private boolean useShader;
  27 + @Shadow private int shaderIndex;
  28 +
  29 + @Shadow abstract void loadShader(ResourceLocation resourceLocationIn);
  30 + @Shadow abstract float getFOVModifier(float partialTicks, boolean useFOVSetting);
  31 + @Shadow abstract void setupCameraTransform(float partialTicks, int pass);
  32 +
  33 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
18 value = "INVOKE", 34 value = "INVOKE",
19 shift = Shift.AFTER, 35 shift = Shift.AFTER,
20 target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V" 36 target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V"
21 )) 37 ))
22 - private void onPreRenderGUI(float partialTicks, CallbackInfo ci) 38 + private void onPreRenderGUI(float partialTicks, long nanoTime, CallbackInfo ci)
23 { 39 {
24 ClientProxy.preRenderGUI(partialTicks); 40 ClientProxy.preRenderGUI(partialTicks);
25 } 41 }
26 42
27 - @Inject(method = "updateCameraAndRender(F)V", at = @At( 43 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
28 value = "INVOKE", 44 value = "INVOKE",
29 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V" 45 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
30 )) 46 ))
31 - private void onRenderHUD(float partialTicks, CallbackInfo ci) 47 + private void onRenderHUD(float partialTicks, long nanoTime, CallbackInfo ci)
32 { 48 {
33 ClientProxy.onRenderHUD(partialTicks); 49 ClientProxy.onRenderHUD(partialTicks);
34 } 50 }
35 51
36 - @Inject(method = "updateCameraAndRender(F)V", at = @At( 52 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
37 value = "INVOKE", 53 value = "INVOKE",
38 shift = Shift.AFTER, 54 shift = Shift.AFTER,
39 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V" 55 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
40 )) 56 ))
41 - private void onPostRenderHUD(float partialTicks, CallbackInfo ci) 57 + private void onPostRenderHUD(float partialTicks, long nanoTime, CallbackInfo ci)
42 { 58 {
43 ClientProxy.postRenderHUD(partialTicks); 59 ClientProxy.postRenderHUD(partialTicks);
44 } 60 }
@@ -112,4 +128,53 @@ public abstract class MixinEntityRenderer @@ -112,4 +128,53 @@ public abstract class MixinEntityRenderer
112 { 128 {
113 ClientProxy.onRenderClouds(renderGlobalIn, partialTicks, pass); 129 ClientProxy.onRenderClouds(renderGlobalIn, partialTicks, pass);
114 } 130 }
  131 +
  132 + @Override
  133 + public boolean getUseShader()
  134 + {
  135 + return this.useShader;
  136 + }
  137 +
  138 + @Override
  139 + public void setUseShader(boolean useShader)
  140 + {
  141 + this.useShader = useShader;
  142 + }
  143 +
  144 + @Override
  145 + public ResourceLocation[] getShaders()
  146 + {
  147 + return MixinEntityRenderer.SHADERS_TEXTURES;
  148 + }
  149 +
  150 + @Override
  151 + public int getShaderIndex()
  152 + {
  153 + return this.shaderIndex;
  154 + }
  155 +
  156 + @Override
  157 + public void setShaderIndex(int shaderIndex)
  158 + {
  159 + this.shaderIndex = shaderIndex;
  160 + }
  161 +
  162 + @Override
  163 + public void selectShader(ResourceLocation shader)
  164 + {
  165 + this.loadShader(shader);
  166 + }
  167 +
  168 + @Override
  169 + public float getFOV(float partialTicks, boolean useFOVSetting)
  170 + {
  171 + return this.getFOVModifier(partialTicks, useFOVSetting);
  172 + }
  173 +
  174 + @Override
  175 + public void setupCamera(float partialTicks, int pass)
  176 + {
  177 + this.setupCameraTransform(partialTicks, pass);
  178 + }
  179 +
115 } 180 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinFramebuffer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
src/client/java/com/mumfrey/liteloader/client/mixin/MixinGuiIngame.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
  8 +import org.spongepowered.asm.mixin.Final;
3 import org.spongepowered.asm.mixin.Mixin; 9 import org.spongepowered.asm.mixin.Mixin;
4 import org.spongepowered.asm.mixin.Shadow; 10 import org.spongepowered.asm.mixin.Shadow;
5 import org.spongepowered.asm.mixin.injection.At; 11 import org.spongepowered.asm.mixin.injection.At;
@@ -16,7 +22,7 @@ import net.minecraft.client.gui.GuiNewChat; @@ -16,7 +22,7 @@ import net.minecraft.client.gui.GuiNewChat;
16 @Mixin(GuiIngame.class) 22 @Mixin(GuiIngame.class)
17 public abstract class MixinGuiIngame extends Gui 23 public abstract class MixinGuiIngame extends Gui
18 { 24 {
19 - @Shadow private GuiNewChat persistantChatGUI; 25 + @Shadow @Final private GuiNewChat persistantChatGUI;
20 26
21 @Inject(method = "renderGameOverlay(F)V", at = @At( 27 @Inject(method = "renderGameOverlay(F)V", at = @At(
22 value = "INVOKE", 28 value = "INVOKE",
src/client/java/com/mumfrey/liteloader/client/mixin/MixinGuiTextField.java 0 → 100644
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
  6 +package com.mumfrey.liteloader.client.mixin;
  7 +
  8 +import org.spongepowered.asm.mixin.Final;
  9 +import org.spongepowered.asm.mixin.Mixin;
  10 +import org.spongepowered.asm.mixin.Mutable;
  11 +import org.spongepowered.asm.mixin.Shadow;
  12 +
  13 +import com.mumfrey.liteloader.client.overlays.IGuiTextField;
  14 +
  15 +import net.minecraft.client.gui.GuiTextField;
  16 +
  17 +@Mixin(GuiTextField.class)
  18 +public abstract class MixinGuiTextField implements IGuiTextField
  19 +{
  20 + @Shadow @Final @Mutable private int width;
  21 + @Shadow @Final @Mutable private int height;
  22 + @Shadow public int xPosition;
  23 + @Shadow public int yPosition;
  24 + @Shadow private int lineScrollOffset;
  25 + @Shadow private int enabledColor;
  26 + @Shadow private int disabledColor;
  27 + @Shadow private boolean isEnabled;
  28 +
  29 + @Override
  30 + public int getXPosition()
  31 + {
  32 + return this.xPosition;
  33 + }
  34 +
  35 + @Override
  36 + public void setXPosition(int xPosition)
  37 + {
  38 + this.xPosition = xPosition;
  39 + }
  40 +
  41 + @Override
  42 + public int getYPosition()
  43 + {
  44 + return this.yPosition;
  45 + }
  46 +
  47 + @Override
  48 + public void setYPosition(int yPosition)
  49 + {
  50 + this.yPosition = yPosition;
  51 + }
  52 +
  53 + @Override
  54 + public int getInternalWidth()
  55 + {
  56 + return this.width;
  57 +
  58 + }
  59 +
  60 + @Override
  61 + public void setInternalWidth(int width)
  62 + {
  63 + this.width = width;
  64 + }
  65 +
  66 + @Override
  67 + public int getHeight()
  68 + {
  69 + return this.height;
  70 + }
  71 +
  72 + @Override
  73 + public void setHeight(int height)
  74 + {
  75 + this.height = height;
  76 + }
  77 +
  78 + @Override
  79 + public boolean isEnabled()
  80 + {
  81 + return this.isEnabled;
  82 + }
  83 +
  84 + @Override
  85 + public int getLineScrollOffset()
  86 + {
  87 + return this.lineScrollOffset;
  88 + }
  89 +
  90 + @Override
  91 + public int getTextColor()
  92 + {
  93 + return this.enabledColor;
  94 + }
  95 +
  96 + @Override
  97 + public int getDisabledTextColour()
  98 + {
  99 + return this.disabledColor;
  100 + }
  101 +
  102 +}
src/client/java/com/mumfrey/liteloader/client/mixin/MixinIntIdentityHashBiMap.java 0 → 100644
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
  6 +package com.mumfrey.liteloader.client.mixin;
  7 +
  8 +import org.spongepowered.asm.mixin.Mixin;
  9 +import org.spongepowered.asm.mixin.Shadow;
  10 +
  11 +import com.mumfrey.liteloader.client.ducks.IIntIdentityHashBiMap;
  12 +
  13 +import net.minecraft.util.IntIdentityHashBiMap;
  14 +
  15 +@Mixin(IntIdentityHashBiMap.class)
  16 +public abstract class MixinIntIdentityHashBiMap<V> implements IIntIdentityHashBiMap<V>
  17 +{
  18 + @Shadow private V[] objectArray;
  19 + @Shadow private int[] intKeys;
  20 + @Shadow private V[] intToObjects;
  21 + @Shadow private int field_186821_e;
  22 + @Shadow private int mapSize;
  23 +
  24 + @Shadow private int func_186816_b(V object, int hash)
  25 + {
  26 + return -1;
  27 + }
  28 +
  29 + @Shadow private int hashObject(V object)
  30 + {
  31 + return -1;
  32 + }
  33 +
  34 + @Override
  35 + public void removeObject(V object)
  36 + {
  37 + int index = this.func_186816_b(object, this.hashObject(object));
  38 + int intKey = this.intKeys[index];
  39 + this.objectArray[index] = null;
  40 + this.intKeys[index] = 0;
  41 + this.intToObjects[intKey] = null;
  42 + }
  43 +}
src/client/java/com/mumfrey/liteloader/client/mixin/MixinIntegratedServer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
@@ -6,11 +11,15 @@ import org.spongepowered.asm.mixin.injection.Inject; @@ -6,11 +11,15 @@ import org.spongepowered.asm.mixin.injection.Inject;
6 import org.spongepowered.asm.mixin.injection.Surrogate; 11 import org.spongepowered.asm.mixin.injection.Surrogate;
7 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
8 13
  14 +import com.mojang.authlib.GameProfileRepository;
  15 +import com.mojang.authlib.minecraft.MinecraftSessionService;
  16 +import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
9 import com.mumfrey.liteloader.client.ClientProxy; 17 import com.mumfrey.liteloader.client.ClientProxy;
10 18
11 import net.minecraft.client.Minecraft; 19 import net.minecraft.client.Minecraft;
12 import net.minecraft.server.MinecraftServer; 20 import net.minecraft.server.MinecraftServer;
13 import net.minecraft.server.integrated.IntegratedServer; 21 import net.minecraft.server.integrated.IntegratedServer;
  22 +import net.minecraft.server.management.PlayerProfileCache;
14 import net.minecraft.world.WorldSettings; 23 import net.minecraft.world.WorldSettings;
15 24
16 @Mixin(IntegratedServer.class) 25 @Mixin(IntegratedServer.class)
@@ -18,7 +27,7 @@ public abstract class MixinIntegratedServer extends MinecraftServer @@ -18,7 +27,7 @@ public abstract class MixinIntegratedServer extends MinecraftServer
18 { 27 {
19 public MixinIntegratedServer() 28 public MixinIntegratedServer()
20 { 29 {
21 - super(null, null); 30 + super(null, null, null, null, null, null, null);
22 } 31 }
23 32
24 @Inject( 33 @Inject(
@@ -26,7 +35,8 @@ public abstract class MixinIntegratedServer extends MinecraftServer @@ -26,7 +35,8 @@ public abstract class MixinIntegratedServer extends MinecraftServer
26 at = @At("RETURN"), 35 at = @At("RETURN"),
27 remap = false 36 remap = false
28 ) 37 )
29 - private void onConstructed(Minecraft mcIn, String folderName, String worldName, WorldSettings settings, CallbackInfo ci) 38 + private void onConstructed(Minecraft mcIn, String folderName, String worldName, WorldSettings settings, YggdrasilAuthenticationService authSrv,
  39 + MinecraftSessionService sessionSrv, GameProfileRepository profileRepo, PlayerProfileCache profileCache, CallbackInfo ci)
30 { 40 {
31 ClientProxy.onCreateIntegratedServer((IntegratedServer)(Object)this, folderName, worldName, settings); 41 ClientProxy.onCreateIntegratedServer((IntegratedServer)(Object)this, folderName, worldName, settings);
32 } 42 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinMinecraft.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
  8 +import java.util.List;
  9 +
  10 +import org.spongepowered.asm.mixin.Final;
3 import org.spongepowered.asm.mixin.Mixin; 11 import org.spongepowered.asm.mixin.Mixin;
  12 +import org.spongepowered.asm.mixin.Shadow;
4 import org.spongepowered.asm.mixin.injection.At; 13 import org.spongepowered.asm.mixin.injection.At;
5 import org.spongepowered.asm.mixin.injection.At.Shift; 14 import org.spongepowered.asm.mixin.injection.At.Shift;
6 import org.spongepowered.asm.mixin.injection.Inject; 15 import org.spongepowered.asm.mixin.injection.Inject;
@@ -8,14 +17,25 @@ import org.spongepowered.asm.mixin.injection.Redirect; @@ -8,14 +17,25 @@ import org.spongepowered.asm.mixin.injection.Redirect;
8 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 17 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
9 18
10 import com.mumfrey.liteloader.client.ClientProxy; 19 import com.mumfrey.liteloader.client.ClientProxy;
  20 +import com.mumfrey.liteloader.client.overlays.IMinecraft;
11 21
12 import net.minecraft.client.Minecraft; 22 import net.minecraft.client.Minecraft;
13 import net.minecraft.client.renderer.OpenGlHelper; 23 import net.minecraft.client.renderer.OpenGlHelper;
  24 +import net.minecraft.client.resources.IResourcePack;
14 import net.minecraft.client.shader.Framebuffer; 25 import net.minecraft.client.shader.Framebuffer;
  26 +import net.minecraft.util.Timer;
15 27
16 @Mixin(Minecraft.class) 28 @Mixin(Minecraft.class)
17 -public abstract class MixinMinecraft 29 +public abstract class MixinMinecraft implements IMinecraft
18 { 30 {
  31 + @Shadow private Timer timer;
  32 + @Shadow volatile boolean running;
  33 + @Shadow @Final private List<IResourcePack> defaultResourcePacks;
  34 + @Shadow private String serverName;
  35 + @Shadow private int serverPort;
  36 +
  37 + @Shadow abstract void resize(int width, int height);
  38 +
19 @Inject(method = "startGame()V", at = @At("RETURN")) 39 @Inject(method = "startGame()V", at = @At("RETURN"))
20 private void onStartupComplete(CallbackInfo ci) 40 private void onStartupComplete(CallbackInfo ci)
21 { 41 {
@@ -37,7 +57,7 @@ public abstract class MixinMinecraft @@ -37,7 +57,7 @@ public abstract class MixinMinecraft
37 @Inject(method = "runGameLoop()V", at = @At( 57 @Inject(method = "runGameLoop()V", at = @At(
38 value = "INVOKE", 58 value = "INVOKE",
39 shift = Shift.AFTER, 59 shift = Shift.AFTER,
40 - target = "Lnet/minecraft/client/renderer/EntityRenderer;updateCameraAndRender(F)V" 60 + target = "Lnet/minecraft/client/renderer/EntityRenderer;updateCameraAndRender(FJ)V"
41 )) 61 ))
42 private void onTick(CallbackInfo ci) 62 private void onTick(CallbackInfo ci)
43 { 63 {
@@ -82,4 +102,41 @@ public abstract class MixinMinecraft @@ -82,4 +102,41 @@ public abstract class MixinMinecraft
82 { 102 {
83 ClientProxy.onRender(); 103 ClientProxy.onRender();
84 } 104 }
  105 +
  106 + @Override
  107 + public Timer getTimer()
  108 + {
  109 + return this.timer;
  110 + }
  111 +
  112 + @Override
  113 + public boolean isRunning()
  114 + {
  115 + return this.running;
  116 + }
  117 +
  118 + @Override
  119 + public List<IResourcePack> getDefaultResourcePacks()
  120 + {
  121 + return this.defaultResourcePacks;
  122 + }
  123 +
  124 + @Override
  125 + public String getServerName()
  126 + {
  127 + return this.serverName;
  128 + }
  129 +
  130 + @Override
  131 + public int getServerPort()
  132 + {
  133 + return this.serverPort;
  134 + }
  135 +
  136 + @Override
  137 + public void onResizeWindow(int width, int height)
  138 + {
  139 + this.resize(width, height);
  140 + }
  141 +
85 } 142 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinNetHandlerLoginClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
src/client/java/com/mumfrey/liteloader/client/mixin/MixinObjectIntIdentityMap.java deleted 100644 → 0
1 -package com.mumfrey.liteloader.client.mixin;  
2 -  
3 -import java.util.IdentityHashMap;  
4 -import java.util.List;  
5 -  
6 -import org.spongepowered.asm.mixin.Mixin;  
7 -import org.spongepowered.asm.mixin.Shadow;  
8 -  
9 -import com.mumfrey.liteloader.client.ducks.IObjectIntIdentityMap;  
10 -  
11 -import net.minecraft.util.ObjectIntIdentityMap;  
12 -  
13 -@Mixin(ObjectIntIdentityMap.class)  
14 -public abstract class MixinObjectIntIdentityMap implements IObjectIntIdentityMap  
15 -{  
16 - @Shadow private IdentityHashMap<?, Integer> identityMap;  
17 - @Shadow private List<?> objectList;  
18 -  
19 - @SuppressWarnings("unchecked")  
20 - @Override  
21 - public <V> IdentityHashMap<V, Integer> getIdentityMap()  
22 - {  
23 - return (IdentityHashMap<V, Integer>)this.identityMap;  
24 - }  
25 -  
26 - @SuppressWarnings("unchecked")  
27 - @Override  
28 - public <V> List<V> getObjectList()  
29 - {  
30 - return (List<V>)this.objectList;  
31 - }  
32 -}  
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRealmsMainScreen.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import org.spongepowered.asm.mixin.Mixin; 8 import org.spongepowered.asm.mixin.Mixin;
4 import org.spongepowered.asm.mixin.injection.At; 9 import org.spongepowered.asm.mixin.injection.At;
5 import org.spongepowered.asm.mixin.injection.Inject; 10 import org.spongepowered.asm.mixin.injection.Inject;
6 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
7 -import org.spongepowered.asm.mixin.injection.callback.LocalCapture;  
8 12
9 import com.mojang.realmsclient.RealmsMainScreen; 13 import com.mojang.realmsclient.RealmsMainScreen;
10 import com.mojang.realmsclient.dto.RealmsServer; 14 import com.mojang.realmsclient.dto.RealmsServer;
@@ -15,12 +19,9 @@ import net.minecraft.realms.RealmsScreen; @@ -15,12 +19,9 @@ import net.minecraft.realms.RealmsScreen;
15 @Mixin(value = RealmsMainScreen.class, remap = false) 19 @Mixin(value = RealmsMainScreen.class, remap = false)
16 public abstract class MixinRealmsMainScreen extends RealmsScreen 20 public abstract class MixinRealmsMainScreen extends RealmsScreen
17 { 21 {
18 - @Inject(method = "play(J)V", locals = LocalCapture.CAPTURE_FAILSOFT, at = @At(  
19 - value = "INVOKE",  
20 - target = "Lcom/mojang/realmsclient/RealmsMainScreen;stopRealmsFetcherAndPinger()V"  
21 - ))  
22 - private void onJoinRealm(long serverId, CallbackInfo ci, RealmsServer server) 22 + @Inject(method = "play(Lcom/mojang/realmsclient/dto/RealmsServer;)V", at = @At("HEAD"))
  23 + private void onJoinRealm(RealmsServer server, CallbackInfo ci)
23 { 24 {
24 - PacketEventsClient.onJoinRealm(serverId, server); 25 + PacketEventsClient.onJoinRealm(server);
25 } 26 }
26 } 27 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRegistryNamespaced.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
  8 +import org.spongepowered.asm.mixin.Final;
3 import org.spongepowered.asm.mixin.Mixin; 9 import org.spongepowered.asm.mixin.Mixin;
4 import org.spongepowered.asm.mixin.Shadow; 10 import org.spongepowered.asm.mixin.Shadow;
5 11
6 -import com.mumfrey.liteloader.client.ducks.INamespacedRegistry;  
7 -import com.mumfrey.liteloader.client.ducks.IObjectIntIdentityMap; 12 +import com.mumfrey.liteloader.client.ducks.IIntIdentityHashBiMap;
8 13
9 -import net.minecraft.util.ObjectIntIdentityMap;  
10 -import net.minecraft.util.RegistryNamespaced;  
11 -import net.minecraft.util.RegistrySimple; 14 +import net.minecraft.util.IntIdentityHashBiMap;
  15 +import net.minecraft.util.registry.RegistryNamespaced;
12 16
13 @Mixin(RegistryNamespaced.class) 17 @Mixin(RegistryNamespaced.class)
14 -public abstract class MixinRegistryNamespaced extends RegistrySimple implements INamespacedRegistry 18 +public abstract class MixinRegistryNamespaced<K, V> extends MixinRegistrySimple<K, V>
15 { 19 {
16 - @Shadow protected ObjectIntIdentityMap underlyingIntegerMap;  
17 - 20 + @Shadow @Final protected IntIdentityHashBiMap<V> underlyingIntegerMap;
  21 +
  22 + @SuppressWarnings("unchecked")
18 @Override 23 @Override
19 - public IObjectIntIdentityMap getUnderlyingMap() 24 + public V removeObjectFromRegistry(K key)
20 { 25 {
21 - return (IObjectIntIdentityMap)this.underlyingIntegerMap; 26 + V removed = super.removeObjectFromRegistry(key);
  27 + if (removed != null && this.underlyingIntegerMap instanceof IIntIdentityHashBiMap)
  28 + {
  29 + ((IIntIdentityHashBiMap<V>)this.underlyingIntegerMap).removeObject(removed);
  30 + }
  31 + return removed;
22 } 32 }
23 } 33 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRegistrySimple.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.util.Map; 8 import java.util.Map;
4 9
  10 +import org.spongepowered.asm.mixin.Final;
5 import org.spongepowered.asm.mixin.Mixin; 11 import org.spongepowered.asm.mixin.Mixin;
6 import org.spongepowered.asm.mixin.Shadow; 12 import org.spongepowered.asm.mixin.Shadow;
7 13
8 -import com.mumfrey.liteloader.client.ducks.IRegistrySimple; 14 +import com.mumfrey.liteloader.client.ducks.IMutableRegistry;
9 15
10 -import net.minecraft.util.RegistrySimple; 16 +import net.minecraft.util.registry.RegistrySimple;
11 17
12 @Mixin(RegistrySimple.class) 18 @Mixin(RegistrySimple.class)
13 -public abstract class MixinRegistrySimple implements IRegistrySimple 19 +public abstract class MixinRegistrySimple<K, V> implements IMutableRegistry<K, V>
14 { 20 {
15 - @Shadow protected Map<?, ?> registryObjects; 21 + @Shadow private Object[] values;
  22 + @Shadow @Final protected Map<K, V> registryObjects;
16 23
17 - @SuppressWarnings("unchecked")  
18 @Override 24 @Override
19 - public <K, V> Map<K, V> getRegistryObjects() 25 + public V removeObjectFromRegistry(K key)
20 { 26 {
21 - return (Map<K, V>)this.registryObjects; 27 + this.values = null;
  28 + return this.registryObjects.remove(key);
22 } 29 }
23 } 30 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRenderManager.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.util.Map; 8 import java.util.Map;
@@ -17,19 +22,19 @@ import net.minecraft.entity.Entity; @@ -17,19 +22,19 @@ import net.minecraft.entity.Entity;
17 @Mixin(RenderManager.class) 22 @Mixin(RenderManager.class)
18 public abstract class MixinRenderManager implements IRenderManager 23 public abstract class MixinRenderManager implements IRenderManager
19 { 24 {
20 - @Shadow private Map<Class<? extends Entity>, Render> entityRenderMap; 25 + @Shadow private Map<Class<? extends Entity>, Render<? extends Entity>> entityRenderMap;
21 26
22 @Override 27 @Override
23 - public Map<Class<? extends Entity>, Render> getRenderMap() 28 + public Map<Class<? extends Entity>, Render<? extends Entity>> getRenderMap()
24 { 29 {
25 return this.entityRenderMap; 30 return this.entityRenderMap;
26 } 31 }
27 32
28 - @Redirect(method = "doRenderEntity(Lnet/minecraft/entity/Entity;DDDFFZ)Z", at = @At( 33 + @Redirect(method = "doRenderEntity(Lnet/minecraft/entity/Entity;DDDFFZ)V", at = @At(
29 value = "INVOKE", 34 value = "INVOKE",
30 target = "Lnet/minecraft/client/renderer/entity/Render;doRender(Lnet/minecraft/entity/Entity;DDDFF)V" 35 target = "Lnet/minecraft/client/renderer/entity/Render;doRender(Lnet/minecraft/entity/Entity;DDDFF)V"
31 )) 36 ))
32 - private void onRenderEntity(Render render, Entity entity, double x, double y, double z, float entityYaw, float partialTicks) 37 + private <T extends Entity> void onRenderEntity(Render<T> render, T entity, double x, double y, double z, float entityYaw, float partialTicks)
33 { 38 {
34 RenderManager source = (RenderManager)(Object)this; 39 RenderManager source = (RenderManager)(Object)this;
35 ClientProxy.onRenderEntity(source, render, entity, x, y, z, entityYaw, partialTicks); 40 ClientProxy.onRenderEntity(source, render, entity, x, y, z, entityYaw, partialTicks);
src/client/java/com/mumfrey/liteloader/client/mixin/MixinScreenShotHelper.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.io.File; 8 import java.io.File;
@@ -10,22 +15,24 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @@ -10,22 +15,24 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
10 import com.mumfrey.liteloader.client.ClientProxy; 15 import com.mumfrey.liteloader.client.ClientProxy;
11 16
12 import net.minecraft.client.shader.Framebuffer; 17 import net.minecraft.client.shader.Framebuffer;
13 -import net.minecraft.util.IChatComponent;  
14 import net.minecraft.util.ScreenShotHelper; 18 import net.minecraft.util.ScreenShotHelper;
  19 +import net.minecraft.util.text.ITextComponent;
15 20
16 @Mixin(ScreenShotHelper.class) 21 @Mixin(ScreenShotHelper.class)
17 public abstract class MixinScreenShotHelper 22 public abstract class MixinScreenShotHelper
18 { 23 {
19 @Inject( 24 @Inject(
20 - method = "saveScreenshot(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/shader/Framebuffer;)Lnet/minecraft/util/IChatComponent;", 25 + method = "saveScreenshot(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/shader/Framebuffer;)"
  26 + + "Lnet/minecraft/util/text/ITextComponent;",
21 at = @At( 27 at = @At(
22 value = "INVOKE", 28 value = "INVOKE",
23 - target = "Lnet/minecraft/client/renderer/OpenGlHelper;isFramebufferEnabled()Z", 29 + target = "Lnet/minecraft/util/ScreenShotHelper;createScreenshot(IILnet/minecraft/client/shader/Framebuffer;)"
  30 + + "Ljava/awt/image/BufferedImage;",
24 ordinal = 0 31 ordinal = 0
25 ), 32 ),
26 cancellable = true 33 cancellable = true
27 ) 34 )
28 - private static void onSaveScreenshot(File gameDir, String name, int width, int height, Framebuffer fbo, CallbackInfoReturnable<IChatComponent> ci) 35 + private static void onSaveScreenshot(File gameDir, String name, int width, int height, Framebuffer fbo, CallbackInfoReturnable<ITextComponent> ci)
29 { 36 {
30 ClientProxy.onSaveScreenshot(ci, gameDir, name, width, height, fbo); 37 ClientProxy.onSaveScreenshot(ci, gameDir, name, width, height, fbo);
31 } 38 }
src/client/java/com/mumfrey/liteloader/client/mixin/MixinSession.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.util.UUID; 8 import java.util.UUID;
src/client/java/com/mumfrey/liteloader/client/mixin/MixinSimpleReloadableResourceManager.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.util.List; 8 import java.util.List;
src/client/java/com/mumfrey/liteloader/client/mixin/MixinSoundHandler.java 0 → 100644
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
  6 +package com.mumfrey.liteloader.client.mixin;
  7 +
  8 +import org.spongepowered.asm.mixin.Mixin;
  9 +import org.spongepowered.asm.mixin.Shadow;
  10 +
  11 +import com.mumfrey.liteloader.client.overlays.ISoundHandler;
  12 +
  13 +import net.minecraft.client.audio.SoundHandler;
  14 +import net.minecraft.client.audio.SoundList;
  15 +import net.minecraft.util.ResourceLocation;
  16 +
  17 +@Mixin(SoundHandler.class)
  18 +public abstract class MixinSoundHandler implements ISoundHandler
  19 +{
  20 +
  21 + @Shadow abstract void loadSoundResource(ResourceLocation location, SoundList sounds);
  22 +
  23 + @Override
  24 + public void addSound(ResourceLocation sound, SoundList soundList)
  25 + {
  26 + this.loadSoundResource(sound, soundList);
  27 + }
  28 +
  29 +}
src/client/java/com/mumfrey/liteloader/client/mixin/MixinTileEntityRendererDispatcher.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.mixin; 6 package com.mumfrey.liteloader.client.mixin;
2 7
3 import java.util.Map; 8 import java.util.Map;
@@ -14,10 +19,10 @@ import net.minecraft.tileentity.TileEntity; @@ -14,10 +19,10 @@ import net.minecraft.tileentity.TileEntity;
14 @Mixin(TileEntityRendererDispatcher.class) 19 @Mixin(TileEntityRendererDispatcher.class)
15 public abstract class MixinTileEntityRendererDispatcher implements ITileEntityRendererDispatcher 20 public abstract class MixinTileEntityRendererDispatcher implements ITileEntityRendererDispatcher
16 { 21 {
17 - @Shadow private Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> mapSpecialRenderers; 22 + @Shadow private Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> mapSpecialRenderers;
18 23
19 @Override 24 @Override
20 - public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap() 25 + public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getSpecialRenderMap()
21 { 26 {
22 return this.mapSpecialRenderers; 27 return this.mapSpecialRenderers;
23 } 28 }
src/client/java/com/mumfrey/liteloader/client/overlays/IEntityRenderer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.overlays; 6 package com.mumfrey.liteloader.client.overlays;
2 7
3 import net.minecraft.util.ResourceLocation; 8 import net.minecraft.util.ResourceLocation;
4 9
5 -import com.mumfrey.liteloader.transformers.access.Accessor;  
6 -import com.mumfrey.liteloader.transformers.access.Invoker;  
7 -  
8 /** 10 /**
9 * Adapter for EntityRenderer to expose some private functionality 11 * Adapter for EntityRenderer to expose some private functionality
10 * 12 *
11 * @author Adam Mummery-Smith 13 * @author Adam Mummery-Smith
12 */ 14 */
13 -@Accessor("EntityRenderer")  
14 public interface IEntityRenderer 15 public interface IEntityRenderer
15 { 16 {
16 - @Accessor("useShader") public abstract boolean getUseShader();  
17 - @Accessor("useShader") public abstract void setUseShader(boolean useShader); 17 + public abstract boolean getUseShader();
  18 + public abstract void setUseShader(boolean useShader);
18 19
19 - @Accessor("shaderResourceLocations") public abstract ResourceLocation[] getShaders(); 20 + public abstract ResourceLocation[] getShaders();
20 21
21 - @Accessor("shaderIndex") public abstract int getShaderIndex();  
22 - @Accessor("shaderIndex") public abstract void setShaderIndex(int shaderIndex); 22 + public abstract int getShaderIndex();
  23 + public abstract void setShaderIndex(int shaderIndex);
23 24
24 - @Invoker("loadShader") public abstract void selectShader(ResourceLocation shader); 25 + public abstract void selectShader(ResourceLocation shader);
25 26
26 - @Invoker("getFOVModifier") public abstract float getFOV(float partialTicks, boolean armFOV); 27 + public abstract float getFOV(float partialTicks, boolean armFOV);
27 28
28 - @Invoker("setupCameraTransform") public abstract void setupCamera(float partialTicks, int pass); 29 + public abstract void setupCamera(float partialTicks, int pass);
29 } 30 }
src/client/java/com/mumfrey/liteloader/client/overlays/IGuiTextField.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.overlays; 6 package com.mumfrey.liteloader.client.overlays;
2 7
3 -import com.mumfrey.liteloader.transformers.access.Accessor;  
4 -  
5 /** 8 /**
6 * Adapter for GuiTextField to expose internal properties, mainly to allow 9 * Adapter for GuiTextField to expose internal properties, mainly to allow
7 * sensible subclassing. 10 * sensible subclassing.
8 * 11 *
9 * @author Adam Mummery-Smith 12 * @author Adam Mummery-Smith
10 */ 13 */
11 -@Accessor("GuiTextField")  
12 public interface IGuiTextField 14 public interface IGuiTextField
13 { 15 {
14 - @Accessor("#2") public abstract int getXPosition();  
15 - @Accessor("#2") public abstract void setXPosition(int xPosition);  
16 -  
17 - @Accessor("#3") public abstract int getYPosition();  
18 - @Accessor("#3") public abstract void setYPosition(int yPosition);  
19 -  
20 - @Accessor("#4") public abstract int getInternalWidth();  
21 - @Accessor("#4") public abstract void setInternalWidth(int width);  
22 -  
23 - @Accessor("#5") public abstract int getHeight();  
24 - @Accessor("#5") public abstract void setHeight(int height);  
25 -  
26 - @Accessor("#12") public abstract boolean isEnabled();  
27 -// @Accessor("#12") public abstract void setEnabled(boolean enabled); // built in  
28 -  
29 - @Accessor("#13") public abstract int getLineScrollOffset();  
30 -  
31 - @Accessor("#16") public abstract int getTextColor();  
32 -// @Accessor("#16") public abstract void setTextColor(int color); // built in  
33 -  
34 - @Accessor("#17") public abstract int getDisabledTextColour();  
35 -// @Accessor("#17") public abstract void setDisabledTextColour(int color); // built in 16 + public abstract int getXPosition();
  17 + public abstract void setXPosition(int xPosition);
  18 + public abstract int getYPosition();
  19 + public abstract void setYPosition(int yPosition);
  20 + public abstract int getInternalWidth();
  21 + public abstract void setInternalWidth(int width);
  22 + public abstract int getHeight();
  23 + public abstract void setHeight(int height);
  24 + public abstract boolean isEnabled();
  25 + public abstract int getLineScrollOffset();
  26 + public abstract int getTextColor();
  27 + public abstract int getDisabledTextColour();
  28 +
36 } 29 }
src/client/java/com/mumfrey/liteloader/client/overlays/IMinecraft.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.overlays; 6 package com.mumfrey.liteloader.client.overlays;
2 7
3 import java.util.List; 8 import java.util.List;
@@ -5,48 +10,36 @@ import java.util.List; @@ -5,48 +10,36 @@ import java.util.List;
5 import net.minecraft.client.resources.IResourcePack; 10 import net.minecraft.client.resources.IResourcePack;
6 import net.minecraft.util.Timer; 11 import net.minecraft.util.Timer;
7 12
8 -import com.mumfrey.liteloader.core.runtime.Obf;  
9 -import com.mumfrey.liteloader.transformers.access.Accessor;  
10 -import com.mumfrey.liteloader.transformers.access.Invoker;  
11 -import com.mumfrey.liteloader.transformers.access.ObfTableClass;  
12 -  
13 /** 13 /**
14 * Interface containing injected accessors for Minecraft 14 * Interface containing injected accessors for Minecraft
15 * 15 *
16 * @author Adam Mummery-Smith 16 * @author Adam Mummery-Smith
17 */ 17 */
18 -@ObfTableClass(Obf.class)  
19 -@Accessor("Minecraft")  
20 public interface IMinecraft 18 public interface IMinecraft
21 { 19 {
22 /** 20 /**
23 * Get the timer instance 21 * Get the timer instance
24 */ 22 */
25 - @Accessor("timer")  
26 public abstract Timer getTimer(); 23 public abstract Timer getTimer();
27 24
28 /** 25 /**
29 * Get the "running" flag 26 * Get the "running" flag
30 */ 27 */
31 - @Accessor("running")  
32 public abstract boolean isRunning(); 28 public abstract boolean isRunning();
33 29
34 /** 30 /**
35 * Get the default resource packs set 31 * Get the default resource packs set
36 */ 32 */
37 - @Accessor("defaultResourcePacks")  
38 public abstract List<IResourcePack> getDefaultResourcePacks(); 33 public abstract List<IResourcePack> getDefaultResourcePacks();
39 34
40 /** 35 /**
41 * Get the current server address (from connection) 36 * Get the current server address (from connection)
42 */ 37 */
43 - @Accessor("serverName")  
44 public abstract String getServerName(); 38 public abstract String getServerName();
45 39
46 /** 40 /**
47 * Get the current server port (from connection) 41 * Get the current server port (from connection)
48 */ 42 */
49 - @Accessor("serverPort")  
50 public abstract int getServerPort(); 43 public abstract int getServerPort();
51 44
52 /** 45 /**
@@ -55,6 +48,6 @@ public interface IMinecraft @@ -55,6 +48,6 @@ public interface IMinecraft
55 * @param width 48 * @param width
56 * @param height 49 * @param height
57 */ 50 */
58 - @Invoker("resize")  
59 public abstract void onResizeWindow(int width, int height); 51 public abstract void onResizeWindow(int width, int height);
  52 +
60 } 53 }
src/client/java/com/mumfrey/liteloader/client/overlays/ISoundHandler.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.overlays; 6 package com.mumfrey.liteloader.client.overlays;
2 7
3 import net.minecraft.client.audio.SoundList; 8 import net.minecraft.client.audio.SoundList;
4 import net.minecraft.util.ResourceLocation; 9 import net.minecraft.util.ResourceLocation;
5 10
6 -import com.mumfrey.liteloader.transformers.access.Accessor;  
7 -import com.mumfrey.liteloader.transformers.access.Invoker;  
8 -  
9 -@Accessor("SoundHandler")  
10 public interface ISoundHandler 11 public interface ISoundHandler
11 { 12 {
12 - @Invoker("loadSoundResource")  
13 public abstract void addSound(ResourceLocation sound, SoundList soundList); 13 public abstract void addSound(ResourceLocation sound, SoundList soundList);
14 } 14 }
src/client/java/com/mumfrey/liteloader/client/transformers/CrashReportTransformer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.transformers; 6 package com.mumfrey.liteloader.client.transformers;
2 7
3 import java.util.ListIterator; 8 import java.util.ListIterator;
src/client/java/com/mumfrey/liteloader/client/transformers/MinecraftTransformer.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.transformers; 6 package com.mumfrey.liteloader.client.transformers;
2 7
3 import java.util.Iterator; 8 import java.util.Iterator;
@@ -13,27 +18,19 @@ import org.objectweb.asm.tree.TypeInsnNode; @@ -13,27 +18,19 @@ import org.objectweb.asm.tree.TypeInsnNode;
13 18
14 import com.mumfrey.liteloader.core.runtime.Obf; 19 import com.mumfrey.liteloader.core.runtime.Obf;
15 import com.mumfrey.liteloader.launch.LiteLoaderTweaker; 20 import com.mumfrey.liteloader.launch.LiteLoaderTweaker;
16 -import com.mumfrey.liteloader.transformers.access.AccessorTransformer; 21 +import com.mumfrey.liteloader.transformers.ClassTransformer;
17 import com.mumfrey.liteloader.util.log.LiteLoaderLogger; 22 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
18 23
19 -public class MinecraftTransformer extends AccessorTransformer 24 +public class MinecraftTransformer extends ClassTransformer
20 { 25 {
21 private static final String TWEAKCLASS = LiteLoaderTweaker.class.getName().replace('.', '/'); 26 private static final String TWEAKCLASS = LiteLoaderTweaker.class.getName().replace('.', '/');
22 -  
23 - @Override  
24 - protected void addAccessors()  
25 - {  
26 - this.addAccessor(Obf.IMinecraft.name);  
27 - this.addAccessor(Obf.IGuiTextField.name);  
28 - this.addAccessor(Obf.IEntityRenderer.name);  
29 - this.addAccessor(Obf.ISoundHandler.name);  
30 - }  
31 - 27 +
32 @Override 28 @Override
33 - protected void postTransform(String name, String transformedName, ClassNode classNode) 29 + public byte[] transform(String name, String transformedName, byte[] basicClass)
34 { 30 {
35 if ((Obf.Minecraft.name.equals(transformedName) || Obf.Minecraft.obf.equals(transformedName))) 31 if ((Obf.Minecraft.name.equals(transformedName) || Obf.Minecraft.obf.equals(transformedName)))
36 { 32 {
  33 + ClassNode classNode = this.readClass(basicClass, true);
37 for (MethodNode method : classNode.methods) 34 for (MethodNode method : classNode.methods)
38 { 35 {
39 if (Obf.startGame.obf.equals(method.name) || Obf.startGame.srg.equals(method.name) || Obf.startGame.name.equals(method.name)) 36 if (Obf.startGame.obf.equals(method.name) || Obf.startGame.srg.equals(method.name) || Obf.startGame.name.equals(method.name))
@@ -41,9 +38,12 @@ public class MinecraftTransformer extends AccessorTransformer @@ -41,9 +38,12 @@ public class MinecraftTransformer extends AccessorTransformer
41 this.transformStartGame(method); 38 this.transformStartGame(method);
42 } 39 }
43 } 40 }
  41 + return this.writeClass(classNode);
44 } 42 }
  43 + return basicClass;
45 } 44 }
46 45
  46 +
47 private void transformStartGame(MethodNode method) 47 private void transformStartGame(MethodNode method)
48 { 48 {
49 InsnList insns = new InsnList(); 49 InsnList insns = new InsnList();
src/client/java/com/mumfrey/liteloader/client/util/PrivateFieldsClient.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.util; 6 package com.mumfrey.liteloader.client.util;
2 7
3 import java.util.Map; 8 import java.util.Map;
@@ -19,4 +24,4 @@ public final class PrivateFieldsClient&lt;P, T&gt; extends PrivateFields&lt;P, T&gt; @@ -19,4 +24,4 @@ public final class PrivateFieldsClient&lt;P, T&gt; extends PrivateFields&lt;P, T&gt;
19 24
20 public static final PrivateFieldsClient<TileEntity, Map> tileEntityNameToClassMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityNameToClassMap); 25 public static final PrivateFieldsClient<TileEntity, Map> tileEntityNameToClassMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityNameToClassMap);
21 public static final PrivateFieldsClient<TileEntity, Map> tileEntityClassToNameMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityClassToNameMap); 26 public static final PrivateFieldsClient<TileEntity, Map> tileEntityClassToNameMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityClassToNameMap);
22 -}  
23 \ No newline at end of file 27 \ No newline at end of file
  28 +}
src/client/java/com/mumfrey/liteloader/client/util/render/IconAbsolute.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.util.render; 6 package com.mumfrey.liteloader.client.util.render;
2 7
3 import com.mumfrey.liteloader.util.render.IconTextured; 8 import com.mumfrey.liteloader.util.render.IconTextured;
src/client/java/com/mumfrey/liteloader/client/util/render/IconAbsoluteClickable.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.util.render; 6 package com.mumfrey.liteloader.client.util.render;
2 7
3 -import net.minecraft.util.ResourceLocation;  
4 -  
5 import com.mumfrey.liteloader.util.render.IconClickable; 8 import com.mumfrey.liteloader.util.render.IconClickable;
6 9
  10 +import net.minecraft.util.ResourceLocation;
  11 +
7 public abstract class IconAbsoluteClickable extends IconAbsolute implements IconClickable 12 public abstract class IconAbsoluteClickable extends IconAbsolute implements IconClickable
8 { 13 {
9 public IconAbsoluteClickable(ResourceLocation textureResource, String displayText, int width, int height, float uCoord, float vCoord, 14 public IconAbsoluteClickable(ResourceLocation textureResource, String displayText, int width, int height, float uCoord, float vCoord,
src/client/java/com/mumfrey/liteloader/client/util/render/IconTiled.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.client.util.render; 6 package com.mumfrey.liteloader.client.util.render;
2 7
3 import com.mumfrey.liteloader.util.render.Icon; 8 import com.mumfrey.liteloader.util.render.Icon;
src/client/java/com/mumfrey/liteloader/gl/GL.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.gl; 6 package com.mumfrey.liteloader.gl;
2 7
3 import java.nio.ByteBuffer; 8 import java.nio.ByteBuffer;
@@ -5,12 +10,16 @@ import java.nio.DoubleBuffer; @@ -5,12 +10,16 @@ import java.nio.DoubleBuffer;
5 import java.nio.FloatBuffer; 10 import java.nio.FloatBuffer;
6 import java.nio.IntBuffer; 11 import java.nio.IntBuffer;
7 12
8 -import net.minecraft.client.renderer.GlStateManager;  
9 -import net.minecraft.client.renderer.GlStateManager.TexGen;  
10 -  
11 import org.lwjgl.opengl.GL11; 13 import org.lwjgl.opengl.GL11;
12 import org.lwjgl.util.glu.GLU; 14 import org.lwjgl.util.glu.GLU;
13 15
  16 +import net.minecraft.client.renderer.GlStateManager;
  17 +import net.minecraft.client.renderer.GlStateManager.CullFace;
  18 +import net.minecraft.client.renderer.GlStateManager.FogMode;
  19 +import net.minecraft.client.renderer.GlStateManager.TexGen;
  20 +import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
  21 +import net.minecraft.client.renderer.vertex.VertexFormat;
  22 +
14 /** 23 /**
15 * Convenience class for working with Mojang's GLStateManager: 24 * Convenience class for working with Mojang's GLStateManager:
16 * 25 *
@@ -42,6 +51,20 @@ import org.lwjgl.util.glu.GLU; @@ -42,6 +51,20 @@ import org.lwjgl.util.glu.GLU;
42 */ 51 */
43 public class GL 52 public class GL
44 { 53 {
  54 + // Vertex Formats
  55 + public static final VertexFormat VF_BLOCK = DefaultVertexFormats.BLOCK;
  56 + public static final VertexFormat VF_ITEM = DefaultVertexFormats.ITEM;
  57 + public static final VertexFormat VF_OLDMODEL_POSITION_TEX_NORMAL = DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL;
  58 + public static final VertexFormat VF_PARTICLE_POSITION_TEX_COLOR_LMAP = DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP;
  59 + public static final VertexFormat VF_POSITION = DefaultVertexFormats.POSITION;
  60 + public static final VertexFormat VF_POSITION_COLOR = DefaultVertexFormats.POSITION_COLOR;
  61 + public static final VertexFormat VF_POSITION_TEX = DefaultVertexFormats.POSITION_TEX;
  62 + public static final VertexFormat VF_POSITION_NORMAL = DefaultVertexFormats.POSITION_NORMAL;
  63 + public static final VertexFormat VF_POSITION_TEX_COLOR = DefaultVertexFormats.POSITION_TEX_COLOR;
  64 + public static final VertexFormat VF_POSITION_TEX_NORMAL = DefaultVertexFormats.POSITION_TEX_NORMAL;
  65 + public static final VertexFormat VF_POSITION_TEX_LMAP_COLOR = DefaultVertexFormats.POSITION_TEX_LMAP_COLOR;
  66 + public static final VertexFormat VF_POSITION_TEX_COLOR_NORMAL = DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL;
  67 +
45 // GL11 68 // GL11
46 public static final int GL_ACCUM = 0x100; 69 public static final int GL_ACCUM = 0x100;
47 public static final int GL_LOAD = 0x101; 70 public static final int GL_LOAD = 0x101;
@@ -855,12 +878,12 @@ public class GL @@ -855,12 +878,12 @@ public class GL
855 878
856 public static void glEnableLight(int light) 879 public static void glEnableLight(int light)
857 { 880 {
858 - GlStateManager.enableLight(light); // TODO OBF MCPTEST enableBooleanStateAt - enableLight 881 + GlStateManager.enableLight(light);
859 } 882 }
860 883
861 public static void glDisableLight(int light) 884 public static void glDisableLight(int light)
862 { 885 {
863 - GlStateManager.disableLight(light); // TODO OBF MCPTEST disableBooleanStateAt - disableLight 886 + GlStateManager.disableLight(light);
864 } 887 }
865 888
866 public static void glLight(int light, int pname, FloatBuffer params) 889 public static void glLight(int light, int pname, FloatBuffer params)
@@ -943,7 +966,7 @@ public class GL @@ -943,7 +966,7 @@ public class GL
943 GlStateManager.disableFog(); 966 GlStateManager.disableFog();
944 } 967 }
945 968
946 - public static void glSetFogMode(int mode) 969 + public static void glSetFogMode(FogMode mode)
947 { 970 {
948 GlStateManager.setFog(mode); 971 GlStateManager.setFog(mode);
949 } 972 }
@@ -988,7 +1011,7 @@ public class GL @@ -988,7 +1011,7 @@ public class GL
988 GlStateManager.disableCull(); 1011 GlStateManager.disableCull();
989 } 1012 }
990 1013
991 - public static void glCullFace(int mode) 1014 + public static void glCullFace(CullFace mode)
992 { 1015 {
993 GlStateManager.cullFace(mode); 1016 GlStateManager.cullFace(mode);
994 } 1017 }
@@ -1040,7 +1063,7 @@ public class GL @@ -1040,7 +1063,7 @@ public class GL
1040 1063
1041 public static void glTexGen(TexGen tex, int pname, FloatBuffer params) 1064 public static void glTexGen(TexGen tex, int pname, FloatBuffer params)
1042 { 1065 {
1043 - GlStateManager.func_179105_a(tex, pname, params); 1066 + GlStateManager.texGen(tex, pname, params);
1044 } 1067 }
1045 1068
1046 public static void glSetActiveTextureUnit(int texture) 1069 public static void glSetActiveTextureUnit(int texture)
@@ -1050,27 +1073,27 @@ public class GL @@ -1050,27 +1073,27 @@ public class GL
1050 1073
1051 public static void glEnableTexture2D() 1074 public static void glEnableTexture2D()
1052 { 1075 {
1053 - GlStateManager.enableTexture2D(); // TODO OBF MCPTEST func_179098_w - enableTexture2D 1076 + GlStateManager.enableTexture2D();
1054 } 1077 }
1055 1078
1056 public static void glDisableTexture2D() 1079 public static void glDisableTexture2D()
1057 { 1080 {
1058 - GlStateManager.disableTexture2D(); // TODO OBF MCPTEST func_179090_x - disableTexture2D 1081 + GlStateManager.disableTexture2D();
1059 } 1082 }
1060 1083
1061 public static int glGenTextures() 1084 public static int glGenTextures()
1062 { 1085 {
1063 - return GlStateManager.generateTexture(); // TODO OBF MCPTEST func_179146_y - generateTexture 1086 + return GlStateManager.generateTexture();
1064 } 1087 }
1065 1088
1066 public static void glDeleteTextures(int textureName) 1089 public static void glDeleteTextures(int textureName)
1067 { 1090 {
1068 - GlStateManager.deleteTexture(textureName); // TODO OBF MCPTEST func_179150_h - deleteTexture 1091 + GlStateManager.deleteTexture(textureName);
1069 } 1092 }
1070 1093
1071 public static void glBindTexture2D(int textureName) 1094 public static void glBindTexture2D(int textureName)
1072 { 1095 {
1073 - GlStateManager.bindTexture(textureName); // TODO OBF MCPTEST func_179144_i - bindTexture 1096 + GlStateManager.bindTexture(textureName);
1074 } 1097 }
1075 1098
1076 public static void glEnableNormalize() 1099 public static void glEnableNormalize()
src/client/java/com/mumfrey/liteloader/gl/GLClippingPlanes.java
  1 +/*
  2 + * This file is part of LiteLoader.
  3 + * Copyright (C) 2012-16 Adam Mummery-Smith
  4 + * All Rights Reserved.
  5 + */
1 package com.mumfrey.liteloader.gl; 6 package com.mumfrey.liteloader.gl;
2 7
3 import static org.lwjgl.opengl.GL11.*; 8 import static org.lwjgl.opengl.GL11.*;