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 39 \ No newline at end of file
... ...
build.gradle
... ... @@ -17,9 +17,9 @@ buildscript {
17 17 }
18 18 }
19 19 dependencies {
20   - classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
  20 + classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
21 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 33 defaultTasks 'build'
34 34  
35 35 ext {
  36 + def isJenkins = project.hasProperty("jenkins")
  37 +
36 38 // Artefact details
37   - buildNumber = project.hasProperty("buildNumber") ? buildNumber : '0'
  39 + buildNumber = isJenkins ? System.env.BUILD_NUMBER : (project.hasProperty("buildNumber") ? buildNumber : '0')
38 40 buildVersion = project.hasProperty("buildVersion") ? buildVersion : '0.0'
39 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 43 classifier = project.hasProperty("buildType") ? buildType : 'SNAPSHOT'
42 44 isReleaseBuild = "RELEASE".equals(project.classifier.toUpperCase())
43 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 48 // Extended project information
46 49 projectName = 'LiteLoader'
... ... @@ -68,9 +71,15 @@ repositories {
68 71 }
69 72  
70 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 85 minecraft {
... ... @@ -131,6 +140,14 @@ afterEvaluate {
131 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 151 // manifest entries for all jars
135 152 def jarManifest = {
136 153 mainAttributes (
... ... @@ -146,7 +163,7 @@ jar {
146 163 doFirst {
147 164 // Seriously forge?
148 165 ant.replace(
149   - file: sourceSets.main.refMapFile,
  166 + file: file("${compileJava.temporaryDir}/${sourceSets.main.refMap}"),
150 167 token: "func_72355_a(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;)V",
151 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 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 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 9 Description: none
10 10 -->
11 11 <module name="Checker">
... ... @@ -36,7 +36,7 @@
36 36 <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
37 37 </module>
38 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 40 <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
41 41 </module>
42 42 <module name="ParameterName">
... ...
docs/logo.png 0 → 100644

6.6 KB

gradle.properties
... ... @@ -5,6 +5,6 @@ description=LiteLoader
5 5 url=http://www.liteloader.com
6 6 organization=LiteLoader
7 7 buildType=SNAPSHOT
8   -buildVersion=1.8
9   -mcVersion=1.8
10   -mcMappings=snapshot_20151124
11 8 \ No newline at end of file
  9 +buildVersion=1.9
  10 +mcVersion=1.9
  11 +mcMappings=snapshot_20160411
12 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 6 package com.mumfrey.liteloader;
2 7  
3 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 28 *
24 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 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 18 /**
14 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 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 6 package com.mumfrey.liteloader;
2 7  
3 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 6 package com.mumfrey.liteloader;
2 7  
3 8 import net.minecraft.client.renderer.entity.Render;
... ... @@ -22,7 +27,8 @@ public interface EntityRenderListener extends LiteMod
22 27 * @param yaw
23 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 34 * Called immediately following an entity being rendered
... ... @@ -35,5 +41,6 @@ public interface EntityRenderListener extends LiteMod
35 41 * @param yaw
36 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 6 package com.mumfrey.liteloader;
2 7  
3 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 6 package com.mumfrey.liteloader;
2 7  
3 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 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 6 package com.mumfrey.liteloader;
2 7  
3   -import net.minecraft.client.Minecraft;
4   -
5 8 import com.mumfrey.liteloader.core.LiteLoader;
6 9  
  10 +import net.minecraft.client.Minecraft;
  11 +
7 12 /**
8 13 * Interface for mods which need to initialise stuff once the game
9 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 6 package com.mumfrey.liteloader;
2 7  
  8 +import com.mojang.realmsclient.dto.RealmsServer;
  9 +
3 10 import net.minecraft.client.multiplayer.ServerData;
4 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 30 * @param realmsServer If connecting to a realm, a reference to the
26 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 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 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 11 * Interface for mods which want to monitor outbound chat
... ... @@ -16,5 +21,5 @@ public interface OutboundChatListener extends LiteMod
16 21 * @param packet
17 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 6 package com.mumfrey.liteloader;
2 7  
3 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 22 * @param netHandler
18 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 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 6 package com.mumfrey.liteloader;
2 7  
3 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 6 package com.mumfrey.liteloader;
2 7  
3 8 import net.minecraft.client.gui.GuiScreen;
... ... @@ -22,14 +27,6 @@ public interface RenderListener extends LiteMod
22 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 30 * Called immediately after the world/camera transform is initialised
34 31 */
35 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 6 package com.mumfrey.liteloader;
2 7  
3   -import net.minecraft.client.shader.Framebuffer;
4   -import net.minecraft.util.IChatComponent;
5   -
6 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 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 29 * @return FALSE to suspend further processing, or TRUE to allow processing
25 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 6 package com.mumfrey.liteloader;
2 7  
3 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 6 package com.mumfrey.liteloader;
2 7  
3 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 6 package com.mumfrey.liteloader.client;
2 7  
3 8 import com.mumfrey.liteloader.client.ducks.IClientNetLoginHandler;
... ... @@ -9,11 +14,11 @@ import net.minecraft.network.INetHandler;
9 14 import net.minecraft.network.NetworkManager;
10 15 import net.minecraft.network.PacketBuffer;
11 16 import net.minecraft.network.login.INetHandlerLoginClient;
12   -import net.minecraft.network.login.server.S02PacketLoginSuccess;
  17 +import net.minecraft.network.login.server.SPacketLoginSuccess;
13 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 24 * Handler for client plugin channels
... ... @@ -26,7 +31,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
26 31 * @param netHandler
27 32 * @param loginPacket
28 33 */
29   - void onPostLogin(INetHandlerLoginClient netHandler, S02PacketLoginSuccess loginPacket)
  34 + void onPostLogin(INetHandlerLoginClient netHandler, SPacketLoginSuccess loginPacket)
30 35 {
31 36 this.clearPluginChannels(netHandler);
32 37 }
... ... @@ -35,7 +40,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
35 40 * @param netHandler
36 41 * @param loginPacket
37 42 */
38   - void onJoinGame(INetHandler netHandler, S01PacketJoinGame loginPacket)
  43 + void onJoinGame(INetHandler netHandler, SPacketJoinGame loginPacket)
39 44 {
40 45 this.sendRegisteredPluginChannels(netHandler);
41 46 }
... ... @@ -46,7 +51,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
46 51 * @param customPayload
47 52 */
48 53 @Override
49   - public void onPluginChannelMessage(S3FPacketCustomPayload customPayload)
  54 + public void onPluginChannelMessage(SPacketCustomPayload customPayload)
50 55 {
51 56 if (customPayload != null && customPayload.getChannelName() != null)
52 57 {
... ... @@ -67,11 +72,11 @@ public class ClientPluginChannelsClient extends ClientPluginChannels
67 72 if (netHandler instanceof INetHandlerLoginClient)
68 73 {
69 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 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 100 throw new UnregisteredChannelException(channel);
96 101 }
97 102  
98   - C17PacketCustomPayload payload = new C17PacketCustomPayload(channel, data);
  103 + CPacketCustomPayload payload = new CPacketCustomPayload(channel, data);
99 104 return ClientPluginChannelsClient.dispatch(payload);
100 105 }
101 106  
102 107 /**
103 108 * @param payload
104 109 */
105   - static boolean dispatch(C17PacketCustomPayload payload)
  110 + static boolean dispatch(CPacketCustomPayload payload)
106 111 {
107 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 6 package com.mumfrey.liteloader.client;
2 7  
3 8 import java.io.File;
... ... @@ -16,7 +21,7 @@ import net.minecraft.client.renderer.entity.RenderManager;
16 21 import net.minecraft.client.shader.Framebuffer;
17 22 import net.minecraft.entity.Entity;
18 23 import net.minecraft.server.integrated.IntegratedServer;
19   -import net.minecraft.util.IChatComponent;
  24 +import net.minecraft.util.text.ITextComponent;
20 25 import net.minecraft.world.WorldSettings;
21 26  
22 27 /**
... ... @@ -165,18 +170,20 @@ public abstract class ClientProxy extends Proxy
165 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 174 Framebuffer fbo)
170 175 {
171 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 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 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 6 package com.mumfrey.liteloader.client;
2 7  
  8 +import java.util.ArrayList;
3 9 import java.util.Arrays;
4   -import java.util.LinkedList;
5 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 16 import net.minecraft.client.Minecraft;
8 17 import net.minecraft.client.audio.SoundHandler;
9 18 import net.minecraft.client.gui.GuiNewChat;
... ... @@ -14,10 +23,6 @@ import net.minecraft.client.settings.KeyBinding;
14 23 import net.minecraft.profiler.Profiler;
15 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 28 * @author Adam Mummery-Smith
... ... @@ -113,7 +118,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
113 118  
114 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 124 public GuiNewChat getChatGUI()
... ... @@ -142,7 +147,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
142 147 @Override
143 148 public List<KeyBinding> getKeyBindings()
144 149 {
145   - LinkedList<KeyBinding> keyBindings = new LinkedList<KeyBinding>();
  150 + ArrayList<KeyBinding> keyBindings = new ArrayList<KeyBinding>();
146 151 keyBindings.addAll(Arrays.asList(this.engine.gameSettings.keyBindings));
147 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 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 8 import com.mumfrey.liteloader.api.CoreProvider;
12 9 import com.mumfrey.liteloader.common.GameEngine;
13 10 import com.mumfrey.liteloader.common.Resources;
... ... @@ -16,6 +13,14 @@ import com.mumfrey.liteloader.core.LiteLoaderMods;
16 13 import com.mumfrey.liteloader.launch.LoaderProperties;
17 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 25 * CoreProvider which fixes SoundManager derping up at startup
21 26 *
... ... @@ -85,7 +90,7 @@ public class LiteLoaderCoreProviderClient implements CoreProvider
85 90 }
86 91  
87 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 6 package com.mumfrey.liteloader.client;
2 7  
3 8 import org.lwjgl.input.Mouse;
4 9 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
5 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 26 import com.mumfrey.liteloader.client.overlays.IEntityRenderer;
9 27 import com.mumfrey.liteloader.client.overlays.IMinecraft;
10 28 import com.mumfrey.liteloader.common.LoadingProgress;
... ... @@ -28,10 +46,10 @@ import net.minecraft.client.resources.IResourceManager;
28 46 import net.minecraft.client.resources.IResourceManagerReloadListener;
29 47 import net.minecraft.client.shader.Framebuffer;
30 48 import net.minecraft.entity.Entity;
31   -import net.minecraft.network.play.client.C01PacketChatMessage;
  49 +import net.minecraft.network.play.client.CPacketChatMessage;
32 50 import net.minecraft.server.integrated.IntegratedServer;
33   -import net.minecraft.util.IChatComponent;
34 51 import net.minecraft.util.Timer;
  52 +import net.minecraft.util.text.ITextComponent;
35 53  
36 54 public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener
37 55 {
... ... @@ -406,7 +424,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
406 424 Minecraft minecraft = this.engine.getClient();
407 425  
408 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 428 boolean inGame = renderViewEntity != null && renderViewEntity.worldObj != null;
411 429  
412 430 this.profiler.startSection("loader");
... ... @@ -434,7 +452,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
434 452 * @param packet
435 453 * @param message
436 454 */
437   - void onSendChatMessage(C01PacketChatMessage packet, String message)
  455 + void onSendChatMessage(CPacketChatMessage packet, String message)
438 456 {
439 457 this.outboundChatListeners.all().onSendChatMessage(packet, message);
440 458 }
... ... @@ -483,7 +501,6 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
483 501 void onRenderWorld(float partialTicks, long timeSlice)
484 502 {
485 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 540 * @param height
524 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 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 560 * @param partialTicks
544 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 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 576 * @param partialTicks
560 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 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 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 8 import org.lwjgl.input.Keyboard;
11 9  
12 10 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
... ... @@ -20,6 +18,13 @@ import com.mumfrey.liteloader.launch.LoaderProperties;
20 18 import com.mumfrey.liteloader.modconfig.ConfigManager;
21 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 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 6 package com.mumfrey.liteloader.client;
2 7  
3 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 14 import com.mumfrey.liteloader.common.ducks.IChatPacket;
6 15 import com.mumfrey.liteloader.common.transformers.PacketEventInfo;
7 16 import com.mumfrey.liteloader.core.ClientPluginChannels;
... ... @@ -21,14 +30,13 @@ import net.minecraft.client.Minecraft;
21 30 import net.minecraft.network.INetHandler;
22 31 import net.minecraft.network.Packet;
23 32 import net.minecraft.network.login.INetHandlerLoginClient;
24   -import net.minecraft.network.login.server.S02PacketLoginSuccess;
  33 +import net.minecraft.network.login.server.SPacketLoginSuccess;
25 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 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 42 * Client-side packet event handlers
... ... @@ -107,7 +115,7 @@ public class PacketEventsClient extends PacketEvents
107 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 120 PacketEventsClient.joiningRealm = server;
113 121 }
... ... @@ -115,22 +123,23 @@ public class PacketEventsClient extends PacketEvents
115 123 @Override
116 124 protected IThreadListener getPacketContextListener(Packets.Context context)
117 125 {
  126 + Minecraft minecraft = Minecraft.getMinecraft();
118 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 135 /* (non-Javadoc)
127 136 * @see com.mumfrey.liteloader.core.PacketEvents#handlePacket(
128 137 * com.mumfrey.liteloader.common.transformers.PacketEventInfo,
129 138 * net.minecraft.network.INetHandler,
130   - * net.minecraft.network.play.server.S01PacketJoinGame)
  139 + * net.minecraft.network.play.server.SPacketJoinGame)
131 140 */
132 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 144 if (this.preJoinGame(e, netHandler, packet))
136 145 {
... ... @@ -149,7 +158,7 @@ public class PacketEventsClient extends PacketEvents
149 158 * @param packet
150 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 163 if (!(netHandler instanceof INetHandlerPlayClient))
155 164 {
... ... @@ -166,7 +175,7 @@ public class PacketEventsClient extends PacketEvents
166 175 * @param netHandler
167 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 180 this.joinGameListeners.all().onJoinGame(netHandler, packet, Minecraft.getMinecraft().getCurrentServerData(), PacketEventsClient.joiningRealm);
172 181 PacketEventsClient.joiningRealm = null;
... ... @@ -185,7 +194,7 @@ public class PacketEventsClient extends PacketEvents
185 194 * net.minecraft.network.login.server.S02PacketLoginSuccess)
186 195 */
187 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 199 if (netHandler instanceof INetHandlerLoginClient)
191 200 {
... ... @@ -208,21 +217,21 @@ public class PacketEventsClient extends PacketEvents
208 217 * net.minecraft.network.play.server.S02PacketChat)
209 218 */
210 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 222 if (packet.getChatComponent() == null)
214 223 {
215 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 229 String message = chat.getFormattedText();
221 230  
222 231 // Chat filters get a stab at the chat first, if any filter returns false the chat is discarded
223 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 236 if (chatFilter.onChat(chat, message, ret))
228 237 {
... ... @@ -231,7 +240,7 @@ public class PacketEventsClient extends PacketEvents
231 240 chat = ret.get();
232 241 if (chat == null)
233 242 {
234   - chat = new ChatComponentText("");
  243 + chat = new TextComponentString("");
235 244 }
236 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 6 package com.mumfrey.liteloader.client;
2 7  
3 8 import java.io.File;
4 9 import java.util.HashMap;
5 10 import java.util.Map;
6 11  
7   -import net.minecraft.client.resources.IResourceManager;
8   -import net.minecraft.client.resources.IResourcePack;
9   -
10 12 import com.mumfrey.liteloader.LiteMod;
11 13 import com.mumfrey.liteloader.api.ModLoadObserver;
12 14 import com.mumfrey.liteloader.common.Resources;
... ... @@ -17,6 +19,9 @@ import com.mumfrey.liteloader.resources.ModResourcePack;
17 19 import com.mumfrey.liteloader.resources.ModResourcePackDir;
18 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 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 6 package com.mumfrey.liteloader.client;
2 7  
3 8 import java.util.HashMap;
4 9 import java.util.List;
5 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 12 import com.mumfrey.liteloader.client.overlays.IMinecraft;
12 13 import com.mumfrey.liteloader.common.LoadingProgress;
13 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 20 public class ResourcesClient implements Resources<IResourceManager, IResourcePack>
16 21 {
17 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 6 package com.mumfrey.liteloader.client;
2 7  
3 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 6 package com.mumfrey.liteloader.client;
2 7  
3   -import net.minecraft.client.resources.I18n;
4   -
5 8 import com.mumfrey.liteloader.api.TranslationProvider;
6 9  
  10 +import net.minecraft.client.resources.I18n;
  11 +
7 12 public class Translator implements TranslationProvider
8 13 {
9 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 6 package com.mumfrey.liteloader.client.api;
2 7  
3 8 import java.net.URI;
4 9  
5   -import net.minecraft.client.resources.I18n;
6   -import net.minecraft.util.ResourceLocation;
7   -
8 10 import com.mumfrey.liteloader.api.BrandingProvider;
9 11 import com.mumfrey.liteloader.client.util.render.IconAbsolute;
10 12 import com.mumfrey.liteloader.core.LiteLoader;
11 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 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 6 package com.mumfrey.liteloader.client.api;
2 7  
3 8 import java.util.List;
4 9  
5   -import net.minecraft.client.Minecraft;
6   -import net.minecraft.server.integrated.IntegratedServer;
7   -
8 10 import com.google.common.collect.ImmutableList;
9 11 import com.google.common.collect.ObjectArrays;
10 12 import com.mumfrey.liteloader.api.CoreProvider;
... ... @@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.ObjectFactory;
20 22 import com.mumfrey.liteloader.messaging.MessageBus;
21 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 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 6 package com.mumfrey.liteloader.client.api;
2 7  
3 8 import java.util.List;
4 9  
5   -import net.minecraft.client.resources.I18n;
6   -
7 10 import com.mumfrey.liteloader.api.ModInfoDecorator;
8 11 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
9 12 import com.mumfrey.liteloader.client.gui.modlist.GuiModListPanel;
... ... @@ -12,6 +15,8 @@ import com.mumfrey.liteloader.client.util.render.IconAbsoluteClickable;
12 15 import com.mumfrey.liteloader.core.ModInfo;
13 16 import com.mumfrey.liteloader.util.render.IconTextured;
14 17  
  18 +import net.minecraft.client.resources.I18n;
  19 +
15 20 /**
16 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 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 8 import com.mumfrey.liteloader.client.ClientPluginChannelsClient;
10 9 import com.mumfrey.liteloader.client.GameEngineClient;
  10 +import com.mumfrey.liteloader.client.LiteLoaderEventBrokerClient;
11 11 import com.mumfrey.liteloader.client.LiteLoaderPanelManager;
12 12 import com.mumfrey.liteloader.client.PacketEventsClient;
13 13 import com.mumfrey.liteloader.client.gui.startup.LoadingBar;
14 14 import com.mumfrey.liteloader.common.GameEngine;
15 15 import com.mumfrey.liteloader.core.ClientPluginChannels;
16   -import com.mumfrey.liteloader.core.LiteLoaderEventBroker;
17 16 import com.mumfrey.liteloader.core.LiteLoader;
  17 +import com.mumfrey.liteloader.core.LiteLoaderEventBroker;
18 18 import com.mumfrey.liteloader.core.PacketEvents;
19 19 import com.mumfrey.liteloader.core.ServerPluginChannels;
20   -import com.mumfrey.liteloader.interfaces.PanelManager;
21 20 import com.mumfrey.liteloader.interfaces.ObjectFactory;
  21 +import com.mumfrey.liteloader.interfaces.PanelManager;
22 22 import com.mumfrey.liteloader.launch.LoaderEnvironment;
23 23 import com.mumfrey.liteloader.launch.LoaderProperties;
24 24 import com.mumfrey.liteloader.permissions.PermissionsManagerClient;
... ... @@ -26,6 +26,11 @@ import com.mumfrey.liteloader.permissions.PermissionsManagerServer;
26 26 import com.mumfrey.liteloader.util.Input;
27 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 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 6 package com.mumfrey.liteloader.client.ducks;
2 7  
3 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 6 package com.mumfrey.liteloader.client.ducks;
2 7  
3 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 6 package com.mumfrey.liteloader.client.ducks;
2 7  
3 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 6 package com.mumfrey.liteloader.client.ducks;
2 7  
3 8 import java.util.Map;
... ... @@ -7,5 +12,5 @@ import net.minecraft.entity.Entity;
7 12  
8 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 6 package com.mumfrey.liteloader.client.ducks;
2 7  
3 8 import java.util.Map;
... ... @@ -7,5 +12,5 @@ import net.minecraft.tileentity.TileEntity;
7 12  
8 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
4   -import net.minecraft.client.Minecraft;
5   -import net.minecraft.client.gui.GuiButton;
6 9  
7 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 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
... ... @@ -6,16 +11,6 @@ import java.io.IOException;
6 11 import java.util.ArrayList;
7 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 14 import org.lwjgl.input.Keyboard;
20 15 import org.lwjgl.input.Mouse;
21 16  
... ... @@ -35,6 +30,16 @@ import com.mumfrey.liteloader.modconfig.ConfigManager;
35 30 import com.mumfrey.liteloader.modconfig.ConfigPanel;
36 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 44 * GUI screen which displays info about loaded mods and also allows them to be
40 45 * enabled and disabled. An instance of this class is created every time the
... ... @@ -280,7 +285,6 @@ public class GuiLiteLoaderPanel extends GuiScreen
280 285 /* (non-Javadoc)
281 286 * @see net.minecraft.client.gui.GuiScreen#initGui()
282 287 */
283   - @SuppressWarnings("unchecked")
284 288 @Override
285 289 public void initGui()
286 290 {
... ... @@ -790,12 +794,12 @@ public class GuiLiteLoaderPanel extends GuiScreen
790 794 glColor4f(1.0F, 1.0F, 1.0F, alpha);
791 795  
792 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 803 tessellator.draw();
800 804  
801 805 glDisableBlend();
... ... @@ -812,4 +816,4 @@ public class GuiLiteLoaderPanel extends GuiScreen
812 816 {
813 817 glDrawTexturedRect(x, y, icon.getIconWidth(), icon.getIconHeight(), icon.getMinU(), icon.getMinV(), icon.getMaxU(), icon.getMaxV(), alpha);
814 818 }
815   -}
816 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
4 9  
5   -import java.util.LinkedList;
  10 +import java.util.ArrayList;
6 11 import java.util.List;
7 12  
  13 +import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
  14 +
8 15 import net.minecraft.client.Minecraft;
9 16 import net.minecraft.client.gui.Gui;
10 17 import net.minecraft.client.gui.GuiButton;
11 18  
12   -import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
13   -
14 19 /**
15 20 * Base class for panels
16 21 *
... ... @@ -30,7 +35,7 @@ public abstract class GuiPanel extends Gui
30 35 /**
31 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 41 * Current available width
... ... @@ -100,7 +105,9 @@ public abstract class GuiPanel extends Gui
100 105 void draw(int mouseX, int mouseY, float partialTicks)
101 106 {
102 107 for (GuiButton control : this.controls)
  108 + {
103 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 213 glAlphaFunc(GL_GREATER, 0.1F);
207 214 glDisableBlend();
208 215 }
209   -}
210 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import java.net.URI;
... ... @@ -6,12 +11,6 @@ import java.util.List;
6 11 import java.util.Set;
7 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 14 import org.lwjgl.input.Keyboard;
16 15  
17 16 import com.mumfrey.liteloader.api.BrandingProvider;
... ... @@ -22,6 +21,12 @@ import com.mumfrey.liteloader.core.LiteLoader;
22 21 import com.mumfrey.liteloader.util.SortableValue;
23 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 31 * "About LiteLoader" panel which docks in the mod info screen and lists
27 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
4 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 11 import com.mumfrey.liteloader.LiteMod;
10 12 import com.mumfrey.liteloader.modconfig.ConfigPanel;
11 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 20 * Config panel container, this handles drawing the configuration panel chrome
15 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
... ... @@ -6,18 +11,18 @@ import java.net.URI;
6 11 import java.util.ArrayList;
7 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 14 import org.lwjgl.input.Keyboard;
16 15  
17 16 import com.mumfrey.liteloader.core.LiteLoader;
18 17 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
19 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 28 * @author Adam Mummery-Smith
... ... @@ -98,7 +103,7 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
98 103  
99 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 107 this.guiScale = res.getScaleFactor();
103 108  
104 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
... ... @@ -5,10 +10,6 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5 10  
6 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 13 import org.lwjgl.input.Keyboard;
13 14  
14 15 import com.mumfrey.liteloader.LiteMod;
... ... @@ -20,6 +21,10 @@ import com.mumfrey.liteloader.launch.LoaderEnvironment;
20 21 import com.mumfrey.liteloader.modconfig.ConfigManager;
21 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 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 10 import org.lwjgl.input.Keyboard;
12 11  
13 12 import com.mumfrey.liteloader.core.LiteLoaderUpdateSite;
... ... @@ -15,6 +14,12 @@ import com.mumfrey.liteloader.launch.ClassPathUtilities;
15 14 import com.mumfrey.liteloader.launch.LoaderProperties;
16 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 24 * "Check for updates" panel which docks in the mod info screen
20 25 *
... ... @@ -169,7 +174,7 @@ class GuiPanelUpdateCheck extends GuiPanel
169 174 {
170 175 this.updateForced = true;
171 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 178 this.parentScreen.setWorldAndResolution(this.mc, sr.getScaledWidth(), sr.getScaledHeight());
174 179 }
175 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
4 9 import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
5   -import net.minecraft.client.Minecraft;
6   -import net.minecraft.client.gui.GuiButton;
7 10  
8 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 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
4 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 11 import com.google.common.base.Strings;
11 12 import com.mumfrey.liteloader.client.api.LiteLoaderBrandingProvider;
... ... @@ -14,6 +15,11 @@ import com.mumfrey.liteloader.client.util.render.IconAbsolute;
14 15 import com.mumfrey.liteloader.core.ModInfo;
15 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 23 public class GuiModInfoPanel extends Gui
18 24 {
19 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
... ... @@ -6,16 +11,16 @@ import static com.mumfrey.liteloader.gl.GLClippingPlanes.*;
6 11 import java.util.ArrayList;
7 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 14 import com.mumfrey.liteloader.api.ModInfoDecorator;
14 15 import com.mumfrey.liteloader.client.gui.GuiLiteLoaderPanel;
15 16 import com.mumfrey.liteloader.core.ModInfo;
16 17 import com.mumfrey.liteloader.util.render.IconClickable;
17 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 24 public class GuiModListPanel extends Gui
20 25 {
21 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 8 import java.util.List;
4 9  
5   -import net.minecraft.client.gui.FontRenderer;
6   -
7 10 import com.mumfrey.liteloader.api.ModInfoDecorator;
8 11 import com.mumfrey.liteloader.core.ModInfo;
9 12  
  13 +import net.minecraft.client.gui.FontRenderer;
  14 +
10 15 public class GuiModListPanelInvalid extends GuiModListPanel
11 16 {
12 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 8 import java.util.ArrayList;
... ... @@ -5,9 +10,6 @@ import java.util.List;
5 10 import java.util.Map;
6 11 import java.util.TreeMap;
7 12  
8   -import net.minecraft.client.Minecraft;
9   -import net.minecraft.client.resources.I18n;
10   -
11 13 import org.lwjgl.input.Keyboard;
12 14  
13 15 import com.mumfrey.liteloader.LiteMod;
... ... @@ -20,6 +22,9 @@ import com.mumfrey.liteloader.interfaces.LoadableMod;
20 22 import com.mumfrey.liteloader.launch.LoaderEnvironment;
21 23 import com.mumfrey.liteloader.modconfig.ConfigManager;
22 24  
  25 +import net.minecraft.client.Minecraft;
  26 +import net.minecraft.client.resources.I18n;
  27 +
23 28 public class ModList
24 29 {
25 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 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 6 package com.mumfrey.liteloader.client.gui.modlist;
2 7  
3 8 import java.util.List;
4 9 import java.util.Set;
5 10  
6   -import net.minecraft.client.gui.FontRenderer;
7   -import net.minecraft.client.resources.I18n;
8   -
9 11 import com.mumfrey.liteloader.LiteMod;
10 12 import com.mumfrey.liteloader.api.ModInfoDecorator;
11 13 import com.mumfrey.liteloader.core.LiteLoaderMods;
... ... @@ -14,6 +16,9 @@ import com.mumfrey.liteloader.interfaces.Loadable;
14 16 import com.mumfrey.liteloader.interfaces.LoadableMod;
15 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 23 * Represents a mod in the mod info screen, keeps track of mod information and
19 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 6 package com.mumfrey.liteloader.client.gui.startup;
2 7  
3 8 import static com.mumfrey.liteloader.gl.GL.*;
... ... @@ -10,11 +15,16 @@ import java.util.List;
10 15  
11 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 23 import net.minecraft.client.Minecraft;
14 24 import net.minecraft.client.gui.FontRenderer;
15 25 import net.minecraft.client.gui.ScaledResolution;
16 26 import net.minecraft.client.renderer.Tessellator;
17   -import net.minecraft.client.renderer.WorldRenderer;
  27 +import net.minecraft.client.renderer.VertexBuffer;
18 28 import net.minecraft.client.renderer.texture.DynamicTexture;
19 29 import net.minecraft.client.renderer.texture.ITextureObject;
20 30 import net.minecraft.client.renderer.texture.TextureManager;
... ... @@ -23,11 +33,6 @@ import net.minecraft.client.resources.IResourceManager;
23 33 import net.minecraft.client.shader.Framebuffer;
24 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 37 * Crappy implementation of a "Mojang Screen" loading bar
33 38 *
... ... @@ -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 227 int scaleFactor = scaledResolution.getScaleFactor();
223 228 int scaledWidth = scaledResolution.getScaledWidth();
224 229 int scaledHeight = scaledResolution.getScaledHeight();
... ... @@ -254,13 +259,13 @@ public class LoadingBar extends LoadingProgress
254 259  
255 260 this.textureManager.bindTexture(this.textureLocation);
256 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 269 tessellator.draw();
265 270  
266 271 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
... ... @@ -273,12 +278,11 @@ public class LoadingBar extends LoadingProgress
273 278 int v2 = 256;
274 279  
275 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 286 tessellator.draw();
283 287  
284 288 glEnableTexture2D();
... ... @@ -319,23 +323,25 @@ public class LoadingBar extends LoadingProgress
319 323 // tessellator.addVertex(0.0D, scaledHeight - (scaledHeight / 3), 0.0D);
320 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 333 tessellator.draw();
329 334  
330 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 345 tessellator.draw();
340 346  
341 347 glAlphaFunc(GL_GREATER, 0.1F);
... ... @@ -349,7 +355,7 @@ public class LoadingBar extends LoadingProgress
349 355 glAlphaFunc(GL_GREATER, 0.1F);
350 356 // glFlush();
351 357  
352   - this.minecraft.updateDisplay(); // TODO OBF MCPTEST updateDisplay - func_175601_h
  358 + this.minecraft.updateDisplay();
353 359 }
354 360  
355 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import org.spongepowered.asm.mixin.Mixin;
  9 +import org.spongepowered.asm.mixin.Shadow;
4 10 import org.spongepowered.asm.mixin.injection.At;
5   -import org.spongepowered.asm.mixin.injection.Inject;
6 11 import org.spongepowered.asm.mixin.injection.At.Shift;
  12 +import org.spongepowered.asm.mixin.injection.Inject;
7 13 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
8 14  
9 15 import com.mumfrey.liteloader.client.ClientProxy;
  16 +import com.mumfrey.liteloader.client.overlays.IEntityRenderer;
10 17  
11 18 import net.minecraft.client.renderer.EntityRenderer;
12 19 import net.minecraft.client.renderer.RenderGlobal;
  20 +import net.minecraft.util.ResourceLocation;
13 21  
14 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 34 value = "INVOKE",
19 35 shift = Shift.AFTER,
20 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 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 44 value = "INVOKE",
29 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 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 53 value = "INVOKE",
38 54 shift = Shift.AFTER,
39 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 59 ClientProxy.postRenderHUD(partialTicks);
44 60 }
... ... @@ -112,4 +128,53 @@ public abstract class MixinEntityRenderer
112 128 {
113 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
  8 +import org.spongepowered.asm.mixin.Final;
3 9 import org.spongepowered.asm.mixin.Mixin;
4 10 import org.spongepowered.asm.mixin.Shadow;
5 11 import org.spongepowered.asm.mixin.injection.At;
... ... @@ -16,7 +22,7 @@ import net.minecraft.client.gui.GuiNewChat;
16 22 @Mixin(GuiIngame.class)
17 23 public abstract class MixinGuiIngame extends Gui
18 24 {
19   - @Shadow private GuiNewChat persistantChatGUI;
  25 + @Shadow @Final private GuiNewChat persistantChatGUI;
20 26  
21 27 @Inject(method = "renderGameOverlay(F)V", at = @At(
22 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import org.spongepowered.asm.mixin.Mixin;
... ... @@ -6,11 +11,15 @@ import org.spongepowered.asm.mixin.injection.Inject;
6 11 import org.spongepowered.asm.mixin.injection.Surrogate;
7 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 17 import com.mumfrey.liteloader.client.ClientProxy;
10 18  
11 19 import net.minecraft.client.Minecraft;
12 20 import net.minecraft.server.MinecraftServer;
13 21 import net.minecraft.server.integrated.IntegratedServer;
  22 +import net.minecraft.server.management.PlayerProfileCache;
14 23 import net.minecraft.world.WorldSettings;
15 24  
16 25 @Mixin(IntegratedServer.class)
... ... @@ -18,7 +27,7 @@ public abstract class MixinIntegratedServer extends MinecraftServer
18 27 {
19 28 public MixinIntegratedServer()
20 29 {
21   - super(null, null);
  30 + super(null, null, null, null, null, null, null);
22 31 }
23 32  
24 33 @Inject(
... ... @@ -26,7 +35,8 @@ public abstract class MixinIntegratedServer extends MinecraftServer
26 35 at = @At("RETURN"),
27 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 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
  8 +import java.util.List;
  9 +
  10 +import org.spongepowered.asm.mixin.Final;
3 11 import org.spongepowered.asm.mixin.Mixin;
  12 +import org.spongepowered.asm.mixin.Shadow;
4 13 import org.spongepowered.asm.mixin.injection.At;
5 14 import org.spongepowered.asm.mixin.injection.At.Shift;
6 15 import org.spongepowered.asm.mixin.injection.Inject;
... ... @@ -8,14 +17,25 @@ import org.spongepowered.asm.mixin.injection.Redirect;
8 17 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
9 18  
10 19 import com.mumfrey.liteloader.client.ClientProxy;
  20 +import com.mumfrey.liteloader.client.overlays.IMinecraft;
11 21  
12 22 import net.minecraft.client.Minecraft;
13 23 import net.minecraft.client.renderer.OpenGlHelper;
  24 +import net.minecraft.client.resources.IResourcePack;
14 25 import net.minecraft.client.shader.Framebuffer;
  26 +import net.minecraft.util.Timer;
15 27  
16 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 39 @Inject(method = "startGame()V", at = @At("RETURN"))
20 40 private void onStartupComplete(CallbackInfo ci)
21 41 {
... ... @@ -37,7 +57,7 @@ public abstract class MixinMinecraft
37 57 @Inject(method = "runGameLoop()V", at = @At(
38 58 value = "INVOKE",
39 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 62 private void onTick(CallbackInfo ci)
43 63 {
... ... @@ -82,4 +102,41 @@ public abstract class MixinMinecraft
82 102 {
83 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import org.spongepowered.asm.mixin.Mixin;
4 9 import org.spongepowered.asm.mixin.injection.At;
5 10 import org.spongepowered.asm.mixin.injection.Inject;
6 11 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
7   -import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
8 12  
9 13 import com.mojang.realmsclient.RealmsMainScreen;
10 14 import com.mojang.realmsclient.dto.RealmsServer;
... ... @@ -15,12 +19,9 @@ import net.minecraft.realms.RealmsScreen;
15 19 @Mixin(value = RealmsMainScreen.class, remap = false)
16 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
  8 +import org.spongepowered.asm.mixin.Final;
3 9 import org.spongepowered.asm.mixin.Mixin;
4 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 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 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import java.util.Map;
4 9  
  10 +import org.spongepowered.asm.mixin.Final;
5 11 import org.spongepowered.asm.mixin.Mixin;
6 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 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 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import java.util.Map;
... ... @@ -17,19 +22,19 @@ import net.minecraft.entity.Entity;
17 22 @Mixin(RenderManager.class)
18 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 27 @Override
23   - public Map<Class<? extends Entity>, Render> getRenderMap()
  28 + public Map<Class<? extends Entity>, Render<? extends Entity>> getRenderMap()
24 29 {
25 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 34 value = "INVOKE",
30 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 39 RenderManager source = (RenderManager)(Object)this;
35 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import java.io.File;
... ... @@ -10,22 +15,24 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
10 15 import com.mumfrey.liteloader.client.ClientProxy;
11 16  
12 17 import net.minecraft.client.shader.Framebuffer;
13   -import net.minecraft.util.IChatComponent;
14 18 import net.minecraft.util.ScreenShotHelper;
  19 +import net.minecraft.util.text.ITextComponent;
15 20  
16 21 @Mixin(ScreenShotHelper.class)
17 22 public abstract class MixinScreenShotHelper
18 23 {
19 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 27 at = @At(
22 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 31 ordinal = 0
25 32 ),
26 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 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 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 6 package com.mumfrey.liteloader.client.mixin;
2 7  
3 8 import java.util.Map;
... ... @@ -14,10 +19,10 @@ import net.minecraft.tileentity.TileEntity;
14 19 @Mixin(TileEntityRendererDispatcher.class)
15 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 24 @Override
20   - public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap()
  25 + public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getSpecialRenderMap()
21 26 {
22 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 6 package com.mumfrey.liteloader.client.overlays;
2 7  
3 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 11 * Adapter for EntityRenderer to expose some private functionality
10 12 *
11 13 * @author Adam Mummery-Smith
12 14 */
13   -@Accessor("EntityRenderer")
14 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 6 package com.mumfrey.liteloader.client.overlays;
2 7  
3   -import com.mumfrey.liteloader.transformers.access.Accessor;
4   -
5 8 /**
6 9 * Adapter for GuiTextField to expose internal properties, mainly to allow
7 10 * sensible subclassing.
8 11 *
9 12 * @author Adam Mummery-Smith
10 13 */
11   -@Accessor("GuiTextField")
12 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 6 package com.mumfrey.liteloader.client.overlays;
2 7  
3 8 import java.util.List;
... ... @@ -5,48 +10,36 @@ import java.util.List;
5 10 import net.minecraft.client.resources.IResourcePack;
6 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 14 * Interface containing injected accessors for Minecraft
15 15 *
16 16 * @author Adam Mummery-Smith
17 17 */
18   -@ObfTableClass(Obf.class)
19   -@Accessor("Minecraft")
20 18 public interface IMinecraft
21 19 {
22 20 /**
23 21 * Get the timer instance
24 22 */
25   - @Accessor("timer")
26 23 public abstract Timer getTimer();
27 24  
28 25 /**
29 26 * Get the "running" flag
30 27 */
31   - @Accessor("running")
32 28 public abstract boolean isRunning();
33 29  
34 30 /**
35 31 * Get the default resource packs set
36 32 */
37   - @Accessor("defaultResourcePacks")
38 33 public abstract List<IResourcePack> getDefaultResourcePacks();
39 34  
40 35 /**
41 36 * Get the current server address (from connection)
42 37 */
43   - @Accessor("serverName")
44 38 public abstract String getServerName();
45 39  
46 40 /**
47 41 * Get the current server port (from connection)
48 42 */
49   - @Accessor("serverPort")
50 43 public abstract int getServerPort();
51 44  
52 45 /**
... ... @@ -55,6 +48,6 @@ public interface IMinecraft
55 48 * @param width
56 49 * @param height
57 50 */
58   - @Invoker("resize")
59 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 6 package com.mumfrey.liteloader.client.overlays;
2 7  
3 8 import net.minecraft.client.audio.SoundList;
4 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 11 public interface ISoundHandler
11 12 {
12   - @Invoker("loadSoundResource")
13 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 6 package com.mumfrey.liteloader.client.transformers;
2 7  
3 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 6 package com.mumfrey.liteloader.client.transformers;
2 7  
3 8 import java.util.Iterator;
... ... @@ -13,27 +18,19 @@ import org.objectweb.asm.tree.TypeInsnNode;
13 18  
14 19 import com.mumfrey.liteloader.core.runtime.Obf;
15 20 import com.mumfrey.liteloader.launch.LiteLoaderTweaker;
16   -import com.mumfrey.liteloader.transformers.access.AccessorTransformer;
  21 +import com.mumfrey.liteloader.transformers.ClassTransformer;
17 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 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 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 31 if ((Obf.Minecraft.name.equals(transformedName) || Obf.Minecraft.obf.equals(transformedName)))
36 32 {
  33 + ClassNode classNode = this.readClass(basicClass, true);
37 34 for (MethodNode method : classNode.methods)
38 35 {
39 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 38 this.transformStartGame(method);
42 39 }
43 40 }
  41 + return this.writeClass(classNode);
44 42 }
  43 + return basicClass;
45 44 }
46 45  
  46 +
47 47 private void transformStartGame(MethodNode method)
48 48 {
49 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 6 package com.mumfrey.liteloader.client.util;
2 7  
3 8 import java.util.Map;
... ... @@ -19,4 +24,4 @@ public final class PrivateFieldsClient&lt;P, T&gt; extends PrivateFields&lt;P, T&gt;
19 24  
20 25 public static final PrivateFieldsClient<TileEntity, Map> tileEntityNameToClassMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityNameToClassMap);
21 26 public static final PrivateFieldsClient<TileEntity, Map> tileEntityClassToNameMap = new PrivateFieldsClient<TileEntity, Map>(TileEntity.class, Obf.tileEntityClassToNameMap);
22   -}
23 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 6 package com.mumfrey.liteloader.client.util.render;
2 7  
3 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 6 package com.mumfrey.liteloader.client.util.render;
2 7  
3   -import net.minecraft.util.ResourceLocation;
4   -
5 8 import com.mumfrey.liteloader.util.render.IconClickable;
6 9  
  10 +import net.minecraft.util.ResourceLocation;
  11 +
7 12 public abstract class IconAbsoluteClickable extends IconAbsolute implements IconClickable
8 13 {
9 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 6 package com.mumfrey.liteloader.client.util.render;
2 7  
3 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 6 package com.mumfrey.liteloader.gl;
2 7  
3 8 import java.nio.ByteBuffer;
... ... @@ -5,12 +10,16 @@ import java.nio.DoubleBuffer;
5 10 import java.nio.FloatBuffer;
6 11 import java.nio.IntBuffer;
7 12  
8   -import net.minecraft.client.renderer.GlStateManager;
9   -import net.minecraft.client.renderer.GlStateManager.TexGen;
10   -
11 13 import org.lwjgl.opengl.GL11;
12 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 24 * Convenience class for working with Mojang's GLStateManager:
16 25 *
... ... @@ -42,6 +51,20 @@ import org.lwjgl.util.glu.GLU;
42 51 */
43 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 68 // GL11
46 69 public static final int GL_ACCUM = 0x100;
47 70 public static final int GL_LOAD = 0x101;
... ... @@ -855,12 +878,12 @@ public class GL
855 878  
856 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 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 889 public static void glLight(int light, int pname, FloatBuffer params)
... ... @@ -943,7 +966,7 @@ public class GL
943 966 GlStateManager.disableFog();
944 967 }
945 968  
946   - public static void glSetFogMode(int mode)
  969 + public static void glSetFogMode(FogMode mode)
947 970 {
948 971 GlStateManager.setFog(mode);
949 972 }
... ... @@ -988,7 +1011,7 @@ public class GL
988 1011 GlStateManager.disableCull();
989 1012 }
990 1013  
991   - public static void glCullFace(int mode)
  1014 + public static void glCullFace(CullFace mode)
992 1015 {
993 1016 GlStateManager.cullFace(mode);
994 1017 }
... ... @@ -1040,7 +1063,7 @@ public class GL
1040 1063  
1041 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 1069 public static void glSetActiveTextureUnit(int texture)
... ... @@ -1050,27 +1073,27 @@ public class GL
1050 1073  
1051 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 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 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 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 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 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 6 package com.mumfrey.liteloader.gl;
2 7  
3 8 import static org.lwjgl.opengl.GL11.*;
... ...