Commit 7b01aee76b8296e9725008f37962a0586b0ed129

Authored by Mumfrey
1 parent 9f5bfc13

Initial 1.8.9 Update

Showing 53 changed files with 774 additions and 654 deletions
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  
... ... @@ -68,9 +68,15 @@ repositories {
68 68 }
69 69  
70 70 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'
  71 +// compile 'org.ow2.asm:asm-debug-all:5.0.3'
  72 + compile('org.spongepowered:mixin:0.5.3-SNAPSHOT') {
  73 + exclude module: 'asm-commons'
  74 + exclude module: 'asm-tree'
  75 + exclude module: 'launchwrapper'
  76 + exclude module: 'guava'
  77 + }
  78 +// compile 'com.google.guava:guava:17.0'
  79 +// compile 'com.google.code.gson:gson:2.2.4'
74 80 }
75 81  
76 82 minecraft {
... ...
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.8.9
  10 +mcVersion=1.8.9
  11 +mcMappings=snapshot_20160204
12 12 \ No newline at end of file
... ...
src/client/java/com/mumfrey/liteloader/EntityRenderListener.java
... ... @@ -22,7 +22,8 @@ public interface EntityRenderListener extends LiteMod
22 22 * @param yaw
23 23 * @param partialTicks
24 24 */
25   - public abstract void onRenderEntity(Render render, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks);
  25 + public abstract void onRenderEntity(Render<? extends Entity> render, Entity entity, double xPos, double yPos, double zPos, float yaw,
  26 + float partialTicks);
26 27  
27 28 /**
28 29 * Called immediately following an entity being rendered
... ... @@ -35,5 +36,6 @@ public interface EntityRenderListener extends LiteMod
35 36 * @param yaw
36 37 * @param partialTicks
37 38 */
38   - public abstract void onPostRenderEntity(Render render, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks);
  39 + public abstract void onPostRenderEntity(Render<? extends Entity> render, Entity entity, double xPos, double yPos, double zPos, float yaw,
  40 + float partialTicks);
39 41 }
... ...
src/client/java/com/mumfrey/liteloader/RenderListener.java
... ... @@ -22,14 +22,6 @@ public interface RenderListener extends LiteMod
22 22 public abstract void onRenderGui(GuiScreen currentScreen);
23 23  
24 24 /**
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 25 * Called immediately after the world/camera transform is initialised
34 26 */
35 27 public abstract void onSetupCameraTransform();
... ...
src/client/java/com/mumfrey/liteloader/client/ClientProxy.java
... ... @@ -171,12 +171,14 @@ public abstract class ClientProxy extends Proxy
171 171 ClientProxy.broker.onScreenshot(ci, name, width, height, fbo);
172 172 }
173 173  
174   - public static void onRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks)
  174 + public static <T extends Entity> void onRenderEntity(RenderManager source, Render<T> render, T entity, double x, double y, double z,
  175 + float yaw, float pTicks)
175 176 {
176 177 ClientProxy.broker.onRenderEntity(source, entity, x, y, z, yaw, pTicks, render);
177 178 }
178 179  
179   - public static void onPostRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks)
  180 + public static <T extends Entity> void onPostRenderEntity(RenderManager source, Render<T> render, T entity, double x, double y, double z,
  181 + float yaw, float pTicks)
180 182 {
181 183 ClientProxy.broker.onPostRenderEntity(source, entity, x, y, z, yaw, pTicks, render);
182 184 }
... ...
src/client/java/com/mumfrey/liteloader/client/GameEngineClient.java
... ... @@ -113,7 +113,7 @@ public class GameEngineClient implements GameEngine&lt;Minecraft, IntegratedServer&gt;
113 113  
114 114 public ScaledResolution getScaledResolution()
115 115 {
116   - return new ScaledResolution(this.engine, this.engine.displayWidth, this.engine.displayHeight);
  116 + return new ScaledResolution(this.engine);
117 117 }
118 118  
119 119 public GuiNewChat getChatGUI()
... ...
src/client/java/com/mumfrey/liteloader/client/LiteLoaderEventBrokerClient.java
... ... @@ -406,7 +406,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
406 406 Minecraft minecraft = this.engine.getClient();
407 407  
408 408 // Flag indicates whether we are in game at the moment
409   - Entity renderViewEntity = minecraft.getRenderViewEntity(); // TODO OBF MCPTEST func_175606_aa - getRenderViewEntity
  409 + Entity renderViewEntity = minecraft.getRenderViewEntity();
410 410 boolean inGame = renderViewEntity != null && renderViewEntity.worldObj != null;
411 411  
412 412 this.profiler.startSection("loader");
... ... @@ -483,7 +483,6 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
483 483 void onRenderWorld(float partialTicks, long timeSlice)
484 484 {
485 485 this.preRenderListeners.all().onRenderWorld(partialTicks);
486   - this.renderListeners.all().onRenderWorld();
487 486 }
488 487  
489 488 /**
... ... @@ -543,8 +542,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
543 542 * @param partialTicks
544 543 * @param render
545 544 */
546   - public void onRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,
547   - Render render)
  545 + public <T extends Entity> void onRenderEntity(RenderManager source, T entity, double xPos, double yPos, double zPos, float yaw,
  546 + float partialTicks, Render<T> render)
548 547 {
549 548 this.entityRenderListeners.all().onRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
550 549 }
... ... @@ -559,8 +558,8 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker&lt;Minecraft
559 558 * @param partialTicks
560 559 * @param render
561 560 */
562   - public void onPostRenderEntity(RenderManager source, Entity entity, double xPos, double yPos, double zPos, float yaw, float partialTicks,
563   - Render render)
  561 + public <T extends Entity> void onPostRenderEntity(RenderManager source, T entity, double xPos, double yPos, double zPos, float yaw,
  562 + float partialTicks, Render<T> render)
564 563 {
565 564 this.entityRenderListeners.all().onPostRenderEntity(render, entity, xPos, yPos, zPos, yaw, partialTicks);
566 565 }
... ...
src/client/java/com/mumfrey/liteloader/client/PacketEventsClient.java
... ... @@ -107,7 +107,7 @@ public class PacketEventsClient extends PacketEvents
107 107 this.postLoginListeners.add(postLoginListener);
108 108 }
109 109  
110   - public static void onJoinRealm(long serverId, RealmsServer server)
  110 + public static void onJoinRealm(RealmsServer server)
111 111 {
112 112 PacketEventsClient.joiningRealm = server;
113 113 }
... ... @@ -130,7 +130,7 @@ public class PacketEventsClient extends PacketEvents
130 130 * net.minecraft.network.play.server.S01PacketJoinGame)
131 131 */
132 132 @Override
133   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet)
  133 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S01PacketJoinGame packet)
134 134 {
135 135 if (this.preJoinGame(e, netHandler, packet))
136 136 {
... ... @@ -149,7 +149,7 @@ public class PacketEventsClient extends PacketEvents
149 149 * @param packet
150 150 * @throws EventCancellationException
151 151 */
152   - private boolean preJoinGame(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet) throws EventCancellationException
  152 + private boolean preJoinGame(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S01PacketJoinGame packet) throws EventCancellationException
153 153 {
154 154 if (!(netHandler instanceof INetHandlerPlayClient))
155 155 {
... ... @@ -166,7 +166,7 @@ public class PacketEventsClient extends PacketEvents
166 166 * @param netHandler
167 167 * @param packet
168 168 */
169   - private void postJoinGame(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet)
  169 + private void postJoinGame(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S01PacketJoinGame packet)
170 170 {
171 171 this.joinGameListeners.all().onJoinGame(netHandler, packet, Minecraft.getMinecraft().getCurrentServerData(), PacketEventsClient.joiningRealm);
172 172 PacketEventsClient.joiningRealm = null;
... ... @@ -185,7 +185,7 @@ public class PacketEventsClient extends PacketEvents
185 185 * net.minecraft.network.login.server.S02PacketLoginSuccess)
186 186 */
187 187 @Override
188   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet)
  188 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S02PacketLoginSuccess packet)
189 189 {
190 190 if (netHandler instanceof INetHandlerLoginClient)
191 191 {
... ... @@ -208,7 +208,7 @@ public class PacketEventsClient extends PacketEvents
208 208 * net.minecraft.network.play.server.S02PacketChat)
209 209 */
210 210 @Override
211   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet)
  211 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S02PacketChat packet)
212 212 {
213 213 if (packet.getChatComponent() == null)
214 214 {
... ...
src/client/java/com/mumfrey/liteloader/client/ducks/IRegistrySimple.java
... ... @@ -2,7 +2,7 @@ package com.mumfrey.liteloader.client.ducks;
2 2  
3 3 import java.util.Map;
4 4  
5   -public interface IRegistrySimple
  5 +public interface IRegistrySimple<K, V>
6 6 {
7   - public abstract <K, V> Map<K, V> getRegistryObjects();
  7 + public abstract Map<K, V> getRegistryObjects();
8 8 }
... ...
src/client/java/com/mumfrey/liteloader/client/ducks/IRenderManager.java
... ... @@ -7,5 +7,5 @@ import net.minecraft.entity.Entity;
7 7  
8 8 public interface IRenderManager
9 9 {
10   - public abstract Map<Class<? extends Entity>, Render> getRenderMap();
  10 + public abstract Map<Class<? extends Entity>, Render<? extends Entity>> getRenderMap();
11 11 }
... ...
src/client/java/com/mumfrey/liteloader/client/ducks/ITileEntityRendererDispatcher.java
... ... @@ -7,5 +7,5 @@ import net.minecraft.tileentity.TileEntity;
7 7  
8 8 public interface ITileEntityRendererDispatcher
9 9 {
10   - public abstract Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap();
  10 + public abstract Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getSpecialRenderMap();
11 11 }
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiLiteLoaderPanel.java
1 1 package com.mumfrey.liteloader.client.gui;
2 2  
3 3 import static com.mumfrey.liteloader.gl.GL.*;
  4 +import static net.minecraft.client.renderer.vertex.DefaultVertexFormats.*;
4 5  
5 6 import java.io.IOException;
6 7 import java.util.ArrayList;
7 8 import java.util.List;
8 9  
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 10 import org.lwjgl.input.Keyboard;
20 11 import org.lwjgl.input.Mouse;
21 12  
... ... @@ -35,6 +26,16 @@ import com.mumfrey.liteloader.modconfig.ConfigManager;
35 26 import com.mumfrey.liteloader.modconfig.ConfigPanel;
36 27 import com.mumfrey.liteloader.util.render.Icon;
37 28  
  29 +import net.minecraft.client.Minecraft;
  30 +import net.minecraft.client.gui.FontRenderer;
  31 +import net.minecraft.client.gui.GuiButton;
  32 +import net.minecraft.client.gui.GuiMainMenu;
  33 +import net.minecraft.client.gui.GuiScreen;
  34 +import net.minecraft.client.renderer.Tessellator;
  35 +import net.minecraft.client.renderer.WorldRenderer;
  36 +import net.minecraft.client.resources.I18n;
  37 +import net.minecraft.util.ResourceLocation;
  38 +
38 39 /**
39 40 * GUI screen which displays info about loaded mods and also allows them to be
40 41 * enabled and disabled. An instance of this class is created every time the
... ... @@ -280,7 +281,6 @@ public class GuiLiteLoaderPanel extends GuiScreen
280 281 /* (non-Javadoc)
281 282 * @see net.minecraft.client.gui.GuiScreen#initGui()
282 283 */
283   - @SuppressWarnings("unchecked")
284 284 @Override
285 285 public void initGui()
286 286 {
... ... @@ -791,11 +791,11 @@ public class GuiLiteLoaderPanel extends GuiScreen
791 791  
792 792 Tessellator tessellator = Tessellator.getInstance();
793 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 );
  794 + worldRenderer.begin(GL_QUADS, POSITION_TEX);
  795 + worldRenderer.pos(x + 0, y + height, 0).tex(u , v2).endVertex();
  796 + worldRenderer.pos(x + width, y + height, 0).tex(u2, v2).endVertex();
  797 + worldRenderer.pos(x + width, y + 0, 0).tex(u2, v ).endVertex();
  798 + worldRenderer.pos(x + 0, y + 0, 0).tex(u , v ).endVertex();
799 799 tessellator.draw();
800 800  
801 801 glDisableBlend();
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelLiteLoaderLog.java
... ... @@ -98,7 +98,7 @@ class GuiPanelLiteLoaderLog extends GuiPanel implements ScrollPanelContent
98 98  
99 99 this.chkScale.checked = GuiPanelLiteLoaderLog.useNativeRes;
100 100  
101   - ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
  101 + ScaledResolution res = new ScaledResolution(this.mc);
102 102 this.guiScale = res.getScaleFactor();
103 103  
104 104 this.scrollPane.setSizeAndPosition(MARGIN, TOP, this.width - (MARGIN * 2), this.height - TOP - BOTTOM);
... ...
src/client/java/com/mumfrey/liteloader/client/gui/GuiPanelUpdateCheck.java
... ... @@ -169,7 +169,7 @@ class GuiPanelUpdateCheck extends GuiPanel
169 169 {
170 170 this.updateForced = true;
171 171 this.parentScreen.setToggleable(false);
172   - ScaledResolution sr = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
  172 + ScaledResolution sr = new ScaledResolution(this.mc);
173 173 this.parentScreen.setWorldAndResolution(this.mc, sr.getScaledWidth(), sr.getScaledHeight());
174 174 }
175 175 else
... ...
src/client/java/com/mumfrey/liteloader/client/gui/startup/LoadingBar.java
1 1 package com.mumfrey.liteloader.client.gui.startup;
2 2  
3 3 import static com.mumfrey.liteloader.gl.GL.*;
  4 +import static net.minecraft.client.renderer.vertex.DefaultVertexFormats.*;
4 5  
5 6 import java.awt.image.BufferedImage;
6 7 import java.io.IOException;
... ... @@ -218,7 +219,7 @@ public class LoadingBar extends LoadingProgress
218 219 }
219 220 }
220 221  
221   - ScaledResolution scaledResolution = new ScaledResolution(this.minecraft, this.minecraft.displayWidth, this.minecraft.displayHeight);
  222 + ScaledResolution scaledResolution = new ScaledResolution(this.minecraft);
222 223 int scaleFactor = scaledResolution.getScaleFactor();
223 224 int scaledWidth = scaledResolution.getScaledWidth();
224 225 int scaledHeight = scaledResolution.getScaledHeight();
... ... @@ -255,12 +256,12 @@ public class LoadingBar extends LoadingProgress
255 256 this.textureManager.bindTexture(this.textureLocation);
256 257 Tessellator tessellator = Tessellator.getInstance();
257 258 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);
  259 + worldRenderer.begin(GL_QUADS, POSITION);
  260 + glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  261 + worldRenderer.pos(0.0D, scaledHeight, 0.0D).endVertex();
  262 + worldRenderer.pos(scaledWidth, scaledHeight, 0.0D).endVertex();
  263 + worldRenderer.pos(scaledWidth, 0.0D, 0.0D).endVertex();
  264 + worldRenderer.pos(0.0D, 0.0D, 0.0D).endVertex();
264 265 tessellator.draw();
265 266  
266 267 glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
... ... @@ -273,12 +274,11 @@ public class LoadingBar extends LoadingProgress
273 274 int v2 = 256;
274 275  
275 276 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);
  277 + worldRenderer.begin(GL_QUADS, POSITION_TEX);
  278 + worldRenderer.pos(left + 0, top + v2, 0.0D).tex((u1 + 0) * texMapScale, (v1 + v2) * texMapScale).endVertex();
  279 + worldRenderer.pos(left + u2, top + v2, 0.0D).tex((u1 + u2) * texMapScale, (v1 + v2) * texMapScale).endVertex();
  280 + worldRenderer.pos(left + u2, top + 0, 0.0D).tex((u1 + u2) * texMapScale, (v1 + 0) * texMapScale).endVertex();
  281 + worldRenderer.pos(left + 0, top + 0, 0.0D).tex((u1 + 0) * texMapScale, (v1 + 0) * texMapScale).endVertex();
282 282 tessellator.draw();
283 283  
284 284 glEnableTexture2D();
... ... @@ -319,23 +319,25 @@ public class LoadingBar extends LoadingProgress
319 319 // tessellator.addVertex(0.0D, scaledHeight - (scaledHeight / 3), 0.0D);
320 320 // tessellator.draw();
321 321  
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);
  322 + worldRenderer.begin(GL_QUADS, POSITION);
  323 + float luma = this.barLuma / 255.0F;
  324 + glColor4f(luma, luma, luma, 0.5F);
  325 + worldRenderer.pos(0.0D, scaledHeight, 0.0D).endVertex();
  326 + worldRenderer.pos(0.0D + scaledWidth, scaledHeight, 0.0D).endVertex();
  327 + worldRenderer.pos(0.0D + scaledWidth, scaledHeight - barHeight, 0.0D).endVertex();
  328 + worldRenderer.pos(0.0D, scaledHeight - barHeight, 0.0D).endVertex();
328 329 tessellator.draw();
329 330  
330 331 barHeight -= 1;
331 332  
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);
  333 + worldRenderer.begin(GL_QUADS, POSITION_COLOR);
  334 + float r2 = this.r2 / 255.0F;
  335 + float g2 = this.g2 / 255.0F;
  336 + float b2 = this.b2 / 255.0F;
  337 + worldRenderer.pos(1.0D + barWidth * progress, scaledHeight - 1, 1.0D).color(r2, g2, b2, 1.0F).endVertex();
  338 + worldRenderer.pos(1.0D + barWidth * progress, scaledHeight - barHeight, 1.0D).color(r2, g2, b2, 1.0F).endVertex();
  339 + worldRenderer.pos(1.0D, scaledHeight - barHeight, 1.0D).color(0.0F, 0.0F, 0.0F, 1.0F).endVertex();
  340 + worldRenderer.pos(1.0D, scaledHeight - 1, 1.0D).color(0.0F, 0.0F, 0.0F, 1.0F).endVertex();
339 341 tessellator.draw();
340 342  
341 343 glAlphaFunc(GL_GREATER, 0.1F);
... ... @@ -349,7 +351,7 @@ public class LoadingBar extends LoadingProgress
349 351 glAlphaFunc(GL_GREATER, 0.1F);
350 352 // glFlush();
351 353  
352   - this.minecraft.updateDisplay(); // TODO OBF MCPTEST updateDisplay - func_175601_h
  354 + this.minecraft.updateDisplay();
353 355 }
354 356  
355 357 private void renderLogTail(int yPos)
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinEntityRenderer.java
1 1 package com.mumfrey.liteloader.client.mixin;
2 2  
3 3 import org.spongepowered.asm.mixin.Mixin;
  4 +import org.spongepowered.asm.mixin.Shadow;
4 5 import org.spongepowered.asm.mixin.injection.At;
5   -import org.spongepowered.asm.mixin.injection.Inject;
6 6 import org.spongepowered.asm.mixin.injection.At.Shift;
  7 +import org.spongepowered.asm.mixin.injection.Inject;
7 8 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
8 9  
9 10 import com.mumfrey.liteloader.client.ClientProxy;
  11 +import com.mumfrey.liteloader.client.overlays.IEntityRenderer;
10 12  
11 13 import net.minecraft.client.renderer.EntityRenderer;
12 14 import net.minecraft.client.renderer.RenderGlobal;
  15 +import net.minecraft.util.ResourceLocation;
13 16  
14 17 @Mixin(EntityRenderer.class)
15   -public abstract class MixinEntityRenderer
  18 +public abstract class MixinEntityRenderer implements IEntityRenderer
16 19 {
17   - @Inject(method = "updateCameraAndRender(F)V", at = @At(
  20 + @Shadow private static ResourceLocation[] shaderResourceLocations;
  21 + @Shadow private boolean useShader;
  22 + @Shadow private int shaderIndex;
  23 +
  24 + @Shadow abstract void loadShader(ResourceLocation resourceLocationIn);
  25 + @Shadow abstract float getFOVModifier(float partialTicks, boolean useFOVSetting);
  26 + @Shadow abstract void setupCameraTransform(float partialTicks, int pass);
  27 +
  28 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
18 29 value = "INVOKE",
19 30 shift = Shift.AFTER,
20 31 target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V"
21 32 ))
22   - private void onPreRenderGUI(float partialTicks, CallbackInfo ci)
  33 + private void onPreRenderGUI(float partialTicks, long nanoTime, CallbackInfo ci)
23 34 {
24 35 ClientProxy.preRenderGUI(partialTicks);
25 36 }
26 37  
27   - @Inject(method = "updateCameraAndRender(F)V", at = @At(
  38 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
28 39 value = "INVOKE",
29 40 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
30 41 ))
31   - private void onRenderHUD(float partialTicks, CallbackInfo ci)
  42 + private void onRenderHUD(float partialTicks, long nanoTime, CallbackInfo ci)
32 43 {
33 44 ClientProxy.onRenderHUD(partialTicks);
34 45 }
35 46  
36   - @Inject(method = "updateCameraAndRender(F)V", at = @At(
  47 + @Inject(method = "updateCameraAndRender(FJ)V", at = @At(
37 48 value = "INVOKE",
38 49 shift = Shift.AFTER,
39 50 target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
40 51 ))
41   - private void onPostRenderHUD(float partialTicks, CallbackInfo ci)
  52 + private void onPostRenderHUD(float partialTicks, long nanoTime, CallbackInfo ci)
42 53 {
43 54 ClientProxy.postRenderHUD(partialTicks);
44 55 }
... ... @@ -112,4 +123,53 @@ public abstract class MixinEntityRenderer
112 123 {
113 124 ClientProxy.onRenderClouds(renderGlobalIn, partialTicks, pass);
114 125 }
  126 +
  127 + @Override
  128 + public boolean getUseShader()
  129 + {
  130 + return this.useShader;
  131 + }
  132 +
  133 + @Override
  134 + public void setUseShader(boolean useShader)
  135 + {
  136 + this.useShader = useShader;
  137 + }
  138 +
  139 + @Override
  140 + public ResourceLocation[] getShaders()
  141 + {
  142 + return MixinEntityRenderer.shaderResourceLocations;
  143 + }
  144 +
  145 + @Override
  146 + public int getShaderIndex()
  147 + {
  148 + return this.shaderIndex;
  149 + }
  150 +
  151 + @Override
  152 + public void setShaderIndex(int shaderIndex)
  153 + {
  154 + this.shaderIndex = shaderIndex;
  155 + }
  156 +
  157 + @Override
  158 + public void selectShader(ResourceLocation shader)
  159 + {
  160 + this.loadShader(shader);
  161 + }
  162 +
  163 + @Override
  164 + public float getFOV(float partialTicks, boolean useFOVSetting)
  165 + {
  166 + return this.getFOVModifier(partialTicks, useFOVSetting);
  167 + }
  168 +
  169 + @Override
  170 + public void setupCamera(float partialTicks, int pass)
  171 + {
  172 + this.setupCameraTransform(partialTicks, pass);
  173 + }
  174 +
115 175 }
... ...
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/MixinMinecraft.java
1 1 package com.mumfrey.liteloader.client.mixin;
2 2  
  3 +import java.util.List;
  4 +
  5 +import org.spongepowered.asm.mixin.Final;
3 6 import org.spongepowered.asm.mixin.Mixin;
  7 +import org.spongepowered.asm.mixin.Shadow;
4 8 import org.spongepowered.asm.mixin.injection.At;
5 9 import org.spongepowered.asm.mixin.injection.At.Shift;
6 10 import org.spongepowered.asm.mixin.injection.Inject;
... ... @@ -8,14 +12,25 @@ import org.spongepowered.asm.mixin.injection.Redirect;
8 12 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
9 13  
10 14 import com.mumfrey.liteloader.client.ClientProxy;
  15 +import com.mumfrey.liteloader.client.overlays.IMinecraft;
11 16  
12 17 import net.minecraft.client.Minecraft;
13 18 import net.minecraft.client.renderer.OpenGlHelper;
  19 +import net.minecraft.client.resources.IResourcePack;
14 20 import net.minecraft.client.shader.Framebuffer;
  21 +import net.minecraft.util.Timer;
15 22  
16 23 @Mixin(Minecraft.class)
17   -public abstract class MixinMinecraft
  24 +public abstract class MixinMinecraft implements IMinecraft
18 25 {
  26 + @Shadow private Timer timer;
  27 + @Shadow volatile boolean running;
  28 + @Shadow @Final private List<IResourcePack> defaultResourcePacks;
  29 + @Shadow private String serverName;
  30 + @Shadow private int serverPort;
  31 +
  32 + @Shadow abstract void resize(int width, int height);
  33 +
19 34 @Inject(method = "startGame()V", at = @At("RETURN"))
20 35 private void onStartupComplete(CallbackInfo ci)
21 36 {
... ... @@ -37,7 +52,7 @@ public abstract class MixinMinecraft
37 52 @Inject(method = "runGameLoop()V", at = @At(
38 53 value = "INVOKE",
39 54 shift = Shift.AFTER,
40   - target = "Lnet/minecraft/client/renderer/EntityRenderer;updateCameraAndRender(F)V"
  55 + target = "Lnet/minecraft/client/renderer/EntityRenderer;updateCameraAndRender(FJ)V"
41 56 ))
42 57 private void onTick(CallbackInfo ci)
43 58 {
... ... @@ -82,4 +97,41 @@ public abstract class MixinMinecraft
82 97 {
83 98 ClientProxy.onRender();
84 99 }
  100 +
  101 + @Override
  102 + public Timer getTimer()
  103 + {
  104 + return this.timer;
  105 + }
  106 +
  107 + @Override
  108 + public boolean isRunning()
  109 + {
  110 + return this.running;
  111 + }
  112 +
  113 + @Override
  114 + public List<IResourcePack> getDefaultResourcePacks()
  115 + {
  116 + return this.defaultResourcePacks;
  117 + }
  118 +
  119 + @Override
  120 + public String getServerName()
  121 + {
  122 + return this.serverName;
  123 + }
  124 +
  125 + @Override
  126 + public int getServerPort()
  127 + {
  128 + return this.serverPort;
  129 + }
  130 +
  131 + @Override
  132 + public void onResizeWindow(int width, int height)
  133 + {
  134 + this.resize(width, height);
  135 + }
  136 +
85 137 }
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinObjectIntIdentityMap.java
... ... @@ -11,10 +11,10 @@ import com.mumfrey.liteloader.client.ducks.IObjectIntIdentityMap;
11 11 import net.minecraft.util.ObjectIntIdentityMap;
12 12  
13 13 @Mixin(ObjectIntIdentityMap.class)
14   -public abstract class MixinObjectIntIdentityMap implements IObjectIntIdentityMap
  14 +public abstract class MixinObjectIntIdentityMap<T> implements IObjectIntIdentityMap
15 15 {
16   - @Shadow private IdentityHashMap<?, Integer> identityMap;
17   - @Shadow private List<?> objectList;
  16 + @Shadow private IdentityHashMap<T, Integer> identityMap;
  17 + @Shadow private List<T> objectList;
18 18  
19 19 @SuppressWarnings("unchecked")
20 20 @Override
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRealmsMainScreen.java
... ... @@ -4,7 +4,6 @@ import org.spongepowered.asm.mixin.Mixin;
4 4 import org.spongepowered.asm.mixin.injection.At;
5 5 import org.spongepowered.asm.mixin.injection.Inject;
6 6 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
7   -import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
8 7  
9 8 import com.mojang.realmsclient.RealmsMainScreen;
10 9 import com.mojang.realmsclient.dto.RealmsServer;
... ... @@ -15,12 +14,9 @@ import net.minecraft.realms.RealmsScreen;
15 14 @Mixin(value = RealmsMainScreen.class, remap = false)
16 15 public abstract class MixinRealmsMainScreen extends RealmsScreen
17 16 {
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)
  17 + @Inject(method = "play(Lcom/mojang/realmsclient/dto/RealmsServer;)V", at = @At("HEAD"))
  18 + private void onJoinRealm(RealmsServer server, CallbackInfo ci)
23 19 {
24   - PacketEventsClient.onJoinRealm(serverId, server);
  20 + PacketEventsClient.onJoinRealm(server);
25 21 }
26 22 }
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRegistryNamespaced.java
... ... @@ -11,9 +11,9 @@ import net.minecraft.util.RegistryNamespaced;
11 11 import net.minecraft.util.RegistrySimple;
12 12  
13 13 @Mixin(RegistryNamespaced.class)
14   -public abstract class MixinRegistryNamespaced extends RegistrySimple implements INamespacedRegistry
  14 +public abstract class MixinRegistryNamespaced<K, V> extends RegistrySimple<K, V> implements INamespacedRegistry
15 15 {
16   - @Shadow protected ObjectIntIdentityMap underlyingIntegerMap;
  16 + @Shadow protected ObjectIntIdentityMap<V> underlyingIntegerMap;
17 17  
18 18 @Override
19 19 public IObjectIntIdentityMap getUnderlyingMap()
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRegistrySimple.java
... ... @@ -10,14 +10,13 @@ import com.mumfrey.liteloader.client.ducks.IRegistrySimple;
10 10 import net.minecraft.util.RegistrySimple;
11 11  
12 12 @Mixin(RegistrySimple.class)
13   -public abstract class MixinRegistrySimple implements IRegistrySimple
  13 +public abstract class MixinRegistrySimple<K, V> implements IRegistrySimple<K, V>
14 14 {
15   - @Shadow protected Map<?, ?> registryObjects;
  15 + @Shadow protected Map<K, V> registryObjects;
16 16  
17   - @SuppressWarnings("unchecked")
18 17 @Override
19   - public <K, V> Map<K, V> getRegistryObjects()
  18 + public Map<K, V> getRegistryObjects()
20 19 {
21   - return (Map<K, V>)this.registryObjects;
  20 + return this.registryObjects;
22 21 }
23 22 }
... ...
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRenderManager.java
... ... @@ -17,10 +17,10 @@ import net.minecraft.entity.Entity;
17 17 @Mixin(RenderManager.class)
18 18 public abstract class MixinRenderManager implements IRenderManager
19 19 {
20   - @Shadow private Map<Class<? extends Entity>, Render> entityRenderMap;
  20 + @Shadow private Map<Class<? extends Entity>, Render<? extends Entity>> entityRenderMap;
21 21  
22 22 @Override
23   - public Map<Class<? extends Entity>, Render> getRenderMap()
  23 + public Map<Class<? extends Entity>, Render<? extends Entity>> getRenderMap()
24 24 {
25 25 return this.entityRenderMap;
26 26 }
... ... @@ -29,7 +29,7 @@ public abstract class MixinRenderManager implements IRenderManager
29 29 value = "INVOKE",
30 30 target = "Lnet/minecraft/client/renderer/entity/Render;doRender(Lnet/minecraft/entity/Entity;DDDFF)V"
31 31 ))
32   - private void onRenderEntity(Render render, Entity entity, double x, double y, double z, float entityYaw, float partialTicks)
  32 + private <T extends Entity> void onRenderEntity(Render<T> render, T entity, double x, double y, double z, float entityYaw, float partialTicks)
33 33 {
34 34 RenderManager source = (RenderManager)(Object)this;
35 35 ClientProxy.onRenderEntity(source, render, entity, x, y, z, entityYaw, partialTicks);
... ...
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
... ... @@ -14,10 +14,10 @@ import net.minecraft.tileentity.TileEntity;
14 14 @Mixin(TileEntityRendererDispatcher.class)
15 15 public abstract class MixinTileEntityRendererDispatcher implements ITileEntityRendererDispatcher
16 16 {
17   - @Shadow private Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> mapSpecialRenderers;
  17 + @Shadow private Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> mapSpecialRenderers;
18 18  
19 19 @Override
20   - public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap()
  20 + public Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getSpecialRenderMap()
21 21 {
22 22 return this.mapSpecialRenderers;
23 23 }
... ...
src/client/java/com/mumfrey/liteloader/client/overlays/IEntityRenderer.java
... ... @@ -2,28 +2,24 @@ package com.mumfrey.liteloader.client.overlays;
2 2  
3 3 import net.minecraft.util.ResourceLocation;
4 4  
5   -import com.mumfrey.liteloader.transformers.access.Accessor;
6   -import com.mumfrey.liteloader.transformers.access.Invoker;
7   -
8 5 /**
9 6 * Adapter for EntityRenderer to expose some private functionality
10 7 *
11 8 * @author Adam Mummery-Smith
12 9 */
13   -@Accessor("EntityRenderer")
14 10 public interface IEntityRenderer
15 11 {
16   - @Accessor("useShader") public abstract boolean getUseShader();
17   - @Accessor("useShader") public abstract void setUseShader(boolean useShader);
  12 + public abstract boolean getUseShader();
  13 + public abstract void setUseShader(boolean useShader);
18 14  
19   - @Accessor("shaderResourceLocations") public abstract ResourceLocation[] getShaders();
  15 + public abstract ResourceLocation[] getShaders();
20 16  
21   - @Accessor("shaderIndex") public abstract int getShaderIndex();
22   - @Accessor("shaderIndex") public abstract void setShaderIndex(int shaderIndex);
  17 + public abstract int getShaderIndex();
  18 + public abstract void setShaderIndex(int shaderIndex);
23 19  
24   - @Invoker("loadShader") public abstract void selectShader(ResourceLocation shader);
  20 + public abstract void selectShader(ResourceLocation shader);
25 21  
26   - @Invoker("getFOVModifier") public abstract float getFOV(float partialTicks, boolean armFOV);
  22 + public abstract float getFOV(float partialTicks, boolean armFOV);
27 23  
28   - @Invoker("setupCameraTransform") public abstract void setupCamera(float partialTicks, int pass);
  24 + public abstract void setupCamera(float partialTicks, int pass);
29 25 }
... ...
src/client/java/com/mumfrey/liteloader/client/overlays/IGuiTextField.java
1 1 package com.mumfrey.liteloader.client.overlays;
2 2  
3   -import com.mumfrey.liteloader.transformers.access.Accessor;
4   -
5 3 /**
6 4 * Adapter for GuiTextField to expose internal properties, mainly to allow
7 5 * sensible subclassing.
8 6 *
9 7 * @author Adam Mummery-Smith
10 8 */
11   -@Accessor("GuiTextField")
12 9 public interface IGuiTextField
13 10 {
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
  11 + public abstract int getXPosition();
  12 + public abstract void setXPosition(int xPosition);
  13 + public abstract int getYPosition();
  14 + public abstract void setYPosition(int yPosition);
  15 + public abstract int getInternalWidth();
  16 + public abstract void setInternalWidth(int width);
  17 + public abstract int getHeight();
  18 + public abstract void setHeight(int height);
  19 + public abstract boolean isEnabled();
  20 + public abstract int getLineScrollOffset();
  21 + public abstract int getTextColor();
  22 + public abstract int getDisabledTextColour();
  23 +
36 24 }
... ...
src/client/java/com/mumfrey/liteloader/client/overlays/IMinecraft.java
... ... @@ -5,48 +5,36 @@ import java.util.List;
5 5 import net.minecraft.client.resources.IResourcePack;
6 6 import net.minecraft.util.Timer;
7 7  
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 8 /**
14 9 * Interface containing injected accessors for Minecraft
15 10 *
16 11 * @author Adam Mummery-Smith
17 12 */
18   -@ObfTableClass(Obf.class)
19   -@Accessor("Minecraft")
20 13 public interface IMinecraft
21 14 {
22 15 /**
23 16 * Get the timer instance
24 17 */
25   - @Accessor("timer")
26 18 public abstract Timer getTimer();
27 19  
28 20 /**
29 21 * Get the "running" flag
30 22 */
31   - @Accessor("running")
32 23 public abstract boolean isRunning();
33 24  
34 25 /**
35 26 * Get the default resource packs set
36 27 */
37   - @Accessor("defaultResourcePacks")
38 28 public abstract List<IResourcePack> getDefaultResourcePacks();
39 29  
40 30 /**
41 31 * Get the current server address (from connection)
42 32 */
43   - @Accessor("serverName")
44 33 public abstract String getServerName();
45 34  
46 35 /**
47 36 * Get the current server port (from connection)
48 37 */
49   - @Accessor("serverPort")
50 38 public abstract int getServerPort();
51 39  
52 40 /**
... ... @@ -55,6 +43,6 @@ public interface IMinecraft
55 43 * @param width
56 44 * @param height
57 45 */
58   - @Invoker("resize")
59 46 public abstract void onResizeWindow(int width, int height);
  47 +
60 48 }
... ...
src/client/java/com/mumfrey/liteloader/client/overlays/ISoundHandler.java
... ... @@ -3,12 +3,7 @@ package com.mumfrey.liteloader.client.overlays;
3 3 import net.minecraft.client.audio.SoundList;
4 4 import net.minecraft.util.ResourceLocation;
5 5  
6   -import com.mumfrey.liteloader.transformers.access.Accessor;
7   -import com.mumfrey.liteloader.transformers.access.Invoker;
8   -
9   -@Accessor("SoundHandler")
10 6 public interface ISoundHandler
11 7 {
12   - @Invoker("loadSoundResource")
13 8 public abstract void addSound(ResourceLocation sound, SoundList soundList);
14 9 }
... ...
src/client/java/com/mumfrey/liteloader/client/transformers/MinecraftTransformer.java
... ... @@ -13,27 +13,19 @@ import org.objectweb.asm.tree.TypeInsnNode;
13 13  
14 14 import com.mumfrey.liteloader.core.runtime.Obf;
15 15 import com.mumfrey.liteloader.launch.LiteLoaderTweaker;
16   -import com.mumfrey.liteloader.transformers.access.AccessorTransformer;
  16 +import com.mumfrey.liteloader.transformers.ClassTransformer;
17 17 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
18 18  
19   -public class MinecraftTransformer extends AccessorTransformer
  19 +public class MinecraftTransformer extends ClassTransformer
20 20 {
21 21 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   -
  22 +
32 23 @Override
33   - protected void postTransform(String name, String transformedName, ClassNode classNode)
  24 + public byte[] transform(String name, String transformedName, byte[] basicClass)
34 25 {
35 26 if ((Obf.Minecraft.name.equals(transformedName) || Obf.Minecraft.obf.equals(transformedName)))
36 27 {
  28 + ClassNode classNode = this.readClass(basicClass, true);
37 29 for (MethodNode method : classNode.methods)
38 30 {
39 31 if (Obf.startGame.obf.equals(method.name) || Obf.startGame.srg.equals(method.name) || Obf.startGame.name.equals(method.name))
... ... @@ -41,9 +33,12 @@ public class MinecraftTransformer extends AccessorTransformer
41 33 this.transformStartGame(method);
42 34 }
43 35 }
  36 + return this.writeClass(classNode);
44 37 }
  38 + return basicClass;
45 39 }
46 40  
  41 +
47 42 private void transformStartGame(MethodNode method)
48 43 {
49 44 InsnList insns = new InsnList();
... ...
src/client/java/com/mumfrey/liteloader/gl/GL.java
... ... @@ -855,12 +855,12 @@ public class GL
855 855  
856 856 public static void glEnableLight(int light)
857 857 {
858   - GlStateManager.enableLight(light); // TODO OBF MCPTEST enableBooleanStateAt - enableLight
  858 + GlStateManager.enableLight(light);
859 859 }
860 860  
861 861 public static void glDisableLight(int light)
862 862 {
863   - GlStateManager.disableLight(light); // TODO OBF MCPTEST disableBooleanStateAt - disableLight
  863 + GlStateManager.disableLight(light);
864 864 }
865 865  
866 866 public static void glLight(int light, int pname, FloatBuffer params)
... ... @@ -1040,7 +1040,7 @@ public class GL
1040 1040  
1041 1041 public static void glTexGen(TexGen tex, int pname, FloatBuffer params)
1042 1042 {
1043   - GlStateManager.func_179105_a(tex, pname, params);
  1043 + GlStateManager.texGen(tex, pname, params);
1044 1044 }
1045 1045  
1046 1046 public static void glSetActiveTextureUnit(int texture)
... ... @@ -1050,27 +1050,27 @@ public class GL
1050 1050  
1051 1051 public static void glEnableTexture2D()
1052 1052 {
1053   - GlStateManager.enableTexture2D(); // TODO OBF MCPTEST func_179098_w - enableTexture2D
  1053 + GlStateManager.enableTexture2D();
1054 1054 }
1055 1055  
1056 1056 public static void glDisableTexture2D()
1057 1057 {
1058   - GlStateManager.disableTexture2D(); // TODO OBF MCPTEST func_179090_x - disableTexture2D
  1058 + GlStateManager.disableTexture2D();
1059 1059 }
1060 1060  
1061 1061 public static int glGenTextures()
1062 1062 {
1063   - return GlStateManager.generateTexture(); // TODO OBF MCPTEST func_179146_y - generateTexture
  1063 + return GlStateManager.generateTexture();
1064 1064 }
1065 1065  
1066 1066 public static void glDeleteTextures(int textureName)
1067 1067 {
1068   - GlStateManager.deleteTexture(textureName); // TODO OBF MCPTEST func_179150_h - deleteTexture
  1068 + GlStateManager.deleteTexture(textureName);
1069 1069 }
1070 1070  
1071 1071 public static void glBindTexture2D(int textureName)
1072 1072 {
1073   - GlStateManager.bindTexture(textureName); // TODO OBF MCPTEST func_179144_i - bindTexture
  1073 + GlStateManager.bindTexture(textureName);
1074 1074 }
1075 1075  
1076 1076 public static void glEnableNormalize()
... ...
src/client/java/com/mumfrey/liteloader/resources/InternalResourcePack.java
... ... @@ -94,7 +94,7 @@ public class InternalResourcePack implements IResourcePack
94 94 * java.lang.String)
95 95 */
96 96 @Override
97   - public IMetadataSection getPackMetadata(IMetadataSerializer par1MetadataSerializer, String par2Str) throws IOException
  97 + public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer par1MetadataSerializer, String par2Str) throws IOException
98 98 {
99 99 return null;
100 100 }
... ...
src/client/java/com/mumfrey/liteloader/resources/ModResourcePack.java
... ... @@ -35,7 +35,7 @@ public class ModResourcePack extends FileResourcePack
35 35 * java.lang.String)
36 36 */
37 37 @Override
38   - public IMetadataSection getPackMetadata(IMetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
  38 + public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
39 39 {
40 40 try
41 41 {
... ...
src/client/java/com/mumfrey/liteloader/resources/ModResourcePackDir.java
... ... @@ -35,7 +35,7 @@ public class ModResourcePackDir extends FolderResourcePack
35 35 * java.lang.String)
36 36 */
37 37 @Override
38   - public IMetadataSection getPackMetadata(IMetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
  38 + public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer metadataSerializer, String metadataSectionName) throws IOException
39 39 {
40 40 try
41 41 {
... ...
src/client/java/com/mumfrey/liteloader/util/ModUtilities.java
... ... @@ -65,11 +65,11 @@ public abstract class ModUtilities
65 65 * @param entityClass
66 66 * @param renderer
67 67 */
68   - public static void addRenderer(Class<? extends Entity> entityClass, Render renderer)
  68 + public static <T extends Entity> void addRenderer(Class<T> entityClass, Render<T> renderer)
69 69 {
70 70 RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
71 71  
72   - Map<Class<? extends Entity>, Render> entityRenderMap = ((IRenderManager)renderManager).getRenderMap();
  72 + Map<Class<? extends Entity>, Render<? extends Entity>> entityRenderMap = ((IRenderManager)renderManager).getRenderMap();
73 73 if (entityRenderMap != null)
74 74 {
75 75 entityRenderMap.put(entityClass, renderer);
... ... @@ -81,13 +81,13 @@ public abstract class ModUtilities
81 81 }
82 82 }
83 83  
84   - public static void addRenderer(Class<? extends TileEntity> tileEntityClass, TileEntitySpecialRenderer renderer)
  84 + public static <T extends TileEntity> void addRenderer(Class<T> tileEntityClass, TileEntitySpecialRenderer<T> renderer)
85 85 {
86 86 TileEntityRendererDispatcher tileEntityRenderer = TileEntityRendererDispatcher.instance;
87 87  
88 88 try
89 89 {
90   - Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> specialRendererMap
  90 + Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> specialRendererMap
91 91 = ((ITileEntityRendererDispatcher)tileEntityRenderer).getSpecialRenderMap();
92 92 specialRendererMap.put(tileEntityClass, renderer);
93 93 renderer.setRendererDispatcher(tileEntityRenderer);
... ... @@ -109,7 +109,7 @@ public abstract class ModUtilities
109 109 */
110 110 public static void addBlock(int blockId, ResourceLocation blockName, Block block, boolean force)
111 111 {
112   - Block existingBlock = (Block)Block.blockRegistry.getObject(blockName);
  112 + Block existingBlock = Block.blockRegistry.getObject(blockName);
113 113  
114 114 try
115 115 {
... ... @@ -157,7 +157,7 @@ public abstract class ModUtilities
157 157 */
158 158 public static void addItem(int itemId, ResourceLocation itemName, Item item, boolean force)
159 159 {
160   - Item existingItem = (Item)Item.itemRegistry.getObject(itemName);
  160 + Item existingItem = Item.itemRegistry.getObject(itemName);
161 161  
162 162 try
163 163 {
... ... @@ -208,7 +208,7 @@ public abstract class ModUtilities
208 208 }
209 209 }
210 210  
211   - private static <K, V> V removeObjectFromRegistry(RegistrySimple registry, K key)
  211 + private static <K, V> V removeObjectFromRegistry(RegistrySimple<K, V> registry, K key)
212 212 {
213 213 if (registry == null) return null;
214 214  
... ... @@ -219,7 +219,8 @@ public abstract class ModUtilities
219 219 underlyingIntegerMap = ((INamespacedRegistry)registry).getUnderlyingMap();
220 220 }
221 221  
222   - Map<K, V> registryObjects = ((IRegistrySimple)registry).<K, V>getRegistryObjects();
  222 + @SuppressWarnings("unchecked")
  223 + Map<K, V> registryObjects = ((IRegistrySimple<K, V>)registry).getRegistryObjects();
223 224 if (registryObjects != null)
224 225 {
225 226 V existingValue = registryObjects.get(key);
... ...
src/client/resources/mixins.liteloader.client.json
1 1 {
2 2 "required": true,
3   - "minVersion": "0.4.10",
  3 + "minVersion": "0.5.3",
4 4 "package": "com.mumfrey.liteloader.client.mixin",
5 5 "refmap": "mixins.liteloader.client.refmap.json",
6 6 "mixins": [
... ... @@ -18,6 +18,11 @@
18 18 "MixinRegistrySimple",
19 19 "MixinRegistryNamespaced",
20 20 "MixinTileEntityRendererDispatcher",
21   - "MixinSimpleReloadableResourceManager"
22   - ]
  21 + "MixinSimpleReloadableResourceManager",
  22 + "MixinSoundHandler",
  23 + "MixinGuiTextField"
  24 + ],
  25 + "injectors": {
  26 + "defaultRequire": 1
  27 + }
23 28 }
24 29 \ No newline at end of file
... ...
src/debug/resources/obfuscation.properties deleted 100644 โ†’ 0
1   -field_71424_I=mcProfiler
2   -field_78729_o=entityRenderMap
3   -field_110546_b=reloadListeners
4   -field_147393_d=networkManager
5   -field_82596_a=registryObjects
6   -field_148759_a=underlyingIntegerMap
7   -field_148749_a=identityMap
8   -field_148748_b=objectList
9   -field_147559_m=mapSpecialRenderers
10   -field_145855_i=nameToClassMap
11   -field_145853_j=classToNameMap
12   -field_71428_T=timer
13   -field_71424_I=mcProfiler
14   -field_71425_J=running
15   -field_110449_ao=defaultResourcePacks
16   -field_71475_ae=serverName
17   -field_71477_af=serverPort
18   -field_147712_ad=shaderResourceLocations
19   -field_147713_ae=shaderIndex
20   -field_175083_ad=useShader
21   -field_149528_b=view
22   -field_70163_u=posY
23   -field_148919_a=chatComponent
24   -func_148833_a=processPacket
25   -func_71411_J=runGameLoop
26   -func_71407_l=runTick
27   -func_78480_b=updateCameraAndRender
28   -func_78471_a=renderWorld
29   -func_175180_a=renderGameOverlay
30   -func_76320_a=startSection
31   -func_76319_b=endSection
32   -func_76318_c=endStartSection
33   -func_148545_a=createPlayerForUser
34   -func_72368_a=recreatePlayerEntity
35   -func_72355_a=initializeConnectionToPlayer
36   -func_72377_c=playerLoggedIn
37   -func_72367_e=playerLoggedOut
38   -func_71384_a=startGame
39   -func_71197_b=startServer
40   -func_71256_s=startServerThread
41   -func_71165_d=sendChatMessage
42   -func_147119_ah=updateFramebufferSize
43   -func_147615_c=framebufferRender
44   -func_178038_a=framebufferRenderExt
45   -func_147612_c=bindFramebufferTexture
46   -func_146230_a=drawChat
47   -func_179086_m=clear
48   -func_175068_a=renderWorldPass
49   -func_148256_e=getProfile
50   -func_148260_a=saveScreenshot
51   -func_148822_b=isFramebufferEnabled
52   -func_147939_a=doRenderEntity
53   -func_76986_a=doRender
54   -func_71370_a=resize
55   -func_175069_a=loadShader
56   -func_78481_a=getFOVModifier
57   -func_78479_a=setupCameraTransform
58   -func_147693_a=loadSoundResource
59   -func_180784_a=onBlockClicked
60   -func_180236_a=activateBlockOrUseItem
61   -func_147346_a=processPlayerBlockPlacement
62   -func_175087_a=handleAnimation
63   -func_147345_a=processPlayerDigging
64   -func_71190_q=updateTimeLightAndEntities
65   -func_180031_a=checkThreadAndEnqueue
66   -func_147347_a=processPlayer
67   -func_174976_a=renderSky
68   -func_180437_a=renderCloudsCheck
69   -func_78468_a=setupFog
70 0 \ No newline at end of file
src/main/java/com/mumfrey/liteloader/PacketHandler.java
... ... @@ -15,7 +15,7 @@ public interface PacketHandler extends LiteMod
15 15 /**
16 16 * Get list of packets to handle
17 17 */
18   - public List<Class<? extends Packet>> getHandledPackets();
  18 + public List<Class<? extends Packet<?>>> getHandledPackets();
19 19  
20 20 /**
21 21 * @param netHandler The vanilla nethandler which will handle this packet if
... ... @@ -28,5 +28,5 @@ public interface PacketHandler extends LiteMod
28 28 * if you wish to inhibit later PacketHandlers but preserve vanilla
29 29 * behaviour.
30 30 */
31   - public abstract boolean handlePacket(INetHandler netHandler, Packet packet);
  31 + public abstract boolean handlePacket(INetHandler netHandler, Packet<?> packet);
32 32 }
... ...
src/main/java/com/mumfrey/liteloader/common/transformers/PacketEventInfo.java
... ... @@ -4,7 +4,7 @@ import com.mumfrey.liteloader.transformers.event.EventInfo;
4 4  
5 5 import net.minecraft.network.Packet;
6 6  
7   -public class PacketEventInfo<S extends Packet> extends EventInfo<S>
  7 +public class PacketEventInfo<S extends Packet<?>> extends EventInfo<S>
8 8 {
9 9 private final int packetId;
10 10  
... ...
src/main/java/com/mumfrey/liteloader/core/LiteLoaderEventBroker.java
... ... @@ -30,6 +30,7 @@ import net.minecraft.network.NetworkManager;
30 30 import net.minecraft.network.play.client.C03PacketPlayer;
31 31 import net.minecraft.network.play.client.C15PacketClientSettings;
32 32 import net.minecraft.network.play.server.S08PacketPlayerPosLook;
  33 +import net.minecraft.network.play.server.S08PacketPlayerPosLook.EnumFlags;
33 34 import net.minecraft.network.play.server.S23PacketBlockChange;
34 35 import net.minecraft.profiler.Profiler;
35 36 import net.minecraft.server.MinecraftServer;
... ... @@ -488,7 +489,7 @@ public abstract class LiteLoaderEventBroker&lt;TClient, TServer extends MinecraftSe
488 489 {
489 490 playerMP.setPositionAndRotation(from.xCoord, from.yCoord, from.zCoord, playerMP.prevRotationYaw, playerMP.prevRotationPitch);
490 491 playerMP.playerNetServerHandler.sendPacket(new S08PacketPlayerPosLook(from.xCoord, from.yCoord, from.zCoord,
491   - playerMP.prevRotationYaw, playerMP.prevRotationPitch, Collections.emptySet()));
  492 + playerMP.prevRotationYaw, playerMP.prevRotationPitch, Collections.<EnumFlags>emptySet()));
492 493 return false;
493 494 }
494 495  
... ...
src/main/java/com/mumfrey/liteloader/core/LiteLoaderVersion.java
... ... @@ -38,12 +38,13 @@ public enum LiteLoaderVersion
38 38 MC_1_7_10_R2(29, 1405369406, "1.7.10", "1.7.10_02", "1.7.10"),
39 39 MC_1_7_10_R3(30, 1407687918, "1.7.10", "1.7.10_03", "1.7.10", "1.7.10_03"),
40 40 MC_1_7_10_R4(31, 1414368553, "1.7.10", "1.7.10_04", "1.7.10", "1.7.10_03", "1.7.10_04"),
41   - MC_1_8_0_R0(32, 0, "1.8", "1.8.0", "1.8", "1.8.0");
  41 + MC_1_8_0_R0(32, 0, "1.8", "1.8.0", "1.8", "1.8.0"),
  42 + MC_1_8_9_R0(34, 0, "1.8.9", "1.8.9", "1.8.9", "1.8.9");
42 43  
43 44 /**
44 45 * Current loader version
45 46 */
46   - public static final LiteLoaderVersion CURRENT = LiteLoaderVersion.MC_1_8_0_R0;
  47 + public static final LiteLoaderVersion CURRENT = LiteLoaderVersion.MC_1_8_9_R0;
47 48  
48 49 private static final LiteLoaderUpdateSite updateSite = new LiteLoaderUpdateSite(LiteLoaderVersion.CURRENT.getMinecraftVersion(),
49 50 LiteLoaderVersion.CURRENT.getReleaseTimestamp());
... ...
src/main/java/com/mumfrey/liteloader/core/PacketEvents.java
... ... @@ -108,10 +108,10 @@ public abstract class PacketEvents implements InterfaceProvider
108 108 */
109 109 public void registerPacketHandler(PacketHandler handler)
110 110 {
111   - List<Class<? extends Packet>> handledPackets = handler.getHandledPackets();
  111 + List<Class<? extends Packet<?>>> handledPackets = handler.getHandledPackets();
112 112 if (handledPackets != null)
113 113 {
114   - for (Class<? extends Packet> packetClass : handledPackets)
  114 + for (Class<? extends Packet<?>> packetClass : handledPackets)
115 115 {
116 116 String packetClassName = packetClass.getName();
117 117 int packetId = Packets.indexOf(packetClassName);
... ... @@ -138,12 +138,12 @@ public abstract class PacketEvents implements InterfaceProvider
138 138 * @param e
139 139 * @param netHandler
140 140 */
141   - public static void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler)
  141 + public static void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler)
142 142 {
143 143 PacketEvents.instance.handlePacket(e, netHandler, e.getPacketId());
144 144 }
145 145  
146   - private void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, int packetId)
  146 + private void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, int packetId)
147 147 {
148 148 Packets packetInfo = Packets.packets[e.getPacketId()];
149 149 IThreadListener threadListener = this.getPacketContextListener(packetInfo.getContext());
... ... @@ -176,9 +176,9 @@ public abstract class PacketEvents implements InterfaceProvider
176 176 * @param netHandler
177 177 * @param packetId
178 178 */
179   - protected void handleAsyncPacketEvent(PacketEventInfo<Packet> e, INetHandler netHandler, int packetId)
  179 + protected void handleAsyncPacketEvent(PacketEventInfo<Packet<?>> e, INetHandler netHandler, int packetId)
180 180 {
181   - Packet packet = e.getSource();
  181 + Packet<?> packet = e.getSource();
182 182  
183 183 if (packetId == this.loginSuccessPacketId)
184 184 {
... ... @@ -193,9 +193,9 @@ public abstract class PacketEvents implements InterfaceProvider
193 193 * @return true if the packet was handled by a local handler and shouldn't
194 194 * be forwarded to later handlers
195 195 */
196   - protected boolean handlePacketEvent(PacketEventInfo<Packet> e, INetHandler netHandler, int packetId)
  196 + protected boolean handlePacketEvent(PacketEventInfo<Packet<?>> e, INetHandler netHandler, int packetId)
197 197 {
198   - Packet packet = e.getSource();
  198 + Packet<?> packet = e.getSource();
199 199  
200 200 if (packetId == this.serverChatPacketId)
201 201 {
... ... @@ -241,7 +241,7 @@ public abstract class PacketEvents implements InterfaceProvider
241 241 * @param netHandler
242 242 * @param packet
243 243 */
244   - protected abstract void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketLoginSuccess packet);
  244 + protected abstract void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S02PacketLoginSuccess packet);
245 245  
246 246 /**
247 247 * S02PacketChat::processPacket()
... ... @@ -249,7 +249,7 @@ public abstract class PacketEvents implements InterfaceProvider
249 249 * @param netHandler
250 250 * @param packet
251 251 */
252   - protected abstract void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S02PacketChat packet);
  252 + protected abstract void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S02PacketChat packet);
253 253  
254 254 /**
255 255 * S02PacketChat::processPacket()
... ... @@ -257,7 +257,7 @@ public abstract class PacketEvents implements InterfaceProvider
257 257 * @param netHandler
258 258 * @param packet
259 259 */
260   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, C01PacketChatMessage packet)
  260 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, C01PacketChatMessage packet)
261 261 {
262 262 EntityPlayerMP player = netHandler instanceof NetHandlerPlayServer ? ((NetHandlerPlayServer)netHandler).playerEntity : null;
263 263  
... ... @@ -273,7 +273,7 @@ public abstract class PacketEvents implements InterfaceProvider
273 273 * @param netHandler
274 274 * @param packet
275 275 */
276   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S01PacketJoinGame packet)
  276 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S01PacketJoinGame packet)
277 277 {
278 278 this.loader.onJoinGame(netHandler, packet);
279 279 }
... ... @@ -284,7 +284,7 @@ public abstract class PacketEvents implements InterfaceProvider
284 284 * @param netHandler
285 285 * @param packet
286 286 */
287   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, S3FPacketCustomPayload packet)
  287 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, S3FPacketCustomPayload packet)
288 288 {
289 289 LiteLoader.getClientPluginChannels().onPluginChannelMessage(packet);
290 290 }
... ... @@ -295,7 +295,7 @@ public abstract class PacketEvents implements InterfaceProvider
295 295 * @param netHandler
296 296 * @param packet
297 297 */
298   - protected void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, C17PacketCustomPayload packet)
  298 + protected void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, C17PacketCustomPayload packet)
299 299 {
300 300 LiteLoader.getServerPluginChannels().onPluginChannelMessage(netHandler, packet);
301 301 }
... ... @@ -307,7 +307,7 @@ public abstract class PacketEvents implements InterfaceProvider
307 307 * @param netHandler
308 308 * @param packet
309 309 */
310   - private void handlePacket(PacketEventInfo<Packet> e, INetHandler netHandler, C15PacketClientSettings packet)
  310 + private void handlePacket(PacketEventInfo<Packet<?>> e, INetHandler netHandler, C15PacketClientSettings packet)
311 311 {
312 312 if (netHandler instanceof NetHandlerPlayServer)
313 313 {
... ...
src/main/java/com/mumfrey/liteloader/core/runtime/Methods.java deleted 100644 โ†’ 0
1   -package com.mumfrey.liteloader.core.runtime;
2   -
3   -import java.io.File;
4   -import java.lang.reflect.Field;
5   -import java.util.HashMap;
6   -import java.util.Map;
7   -
8   -import com.mumfrey.liteloader.transformers.event.MethodInfo;
9   -
10   -/**
11   - *
12   - * @author Adam Mummery-Smith
13   - */
14   -public abstract class Methods
15   -{
16   - // CHECKSTYLE:OFF
17   -
18   - // Client & General
19   - @Deprecated public static final MethodInfo startGame = new MethodInfo(Obf.Minecraft, Obf.startGame, Void.TYPE);
20   - @Deprecated public static final MethodInfo runGameLoop = new MethodInfo(Obf.Minecraft, Obf.runGameLoop, Void.TYPE);
21   - @Deprecated public static final MethodInfo runTick = new MethodInfo(Obf.Minecraft, Obf.runTick, Void.TYPE);
22   - @Deprecated public static final MethodInfo updateFramebufferSize = new MethodInfo(Obf.Minecraft, Obf.updateFramebufferSize, Void.TYPE);
23   - @Deprecated public static final MethodInfo framebufferRender = new MethodInfo(Obf.FrameBuffer, Obf.framebufferRender, Void.TYPE, Integer.TYPE, Integer.TYPE);
24   - @Deprecated public static final MethodInfo framebufferRenderExt = new MethodInfo(Obf.FrameBuffer, Obf.framebufferRenderExt, Void.TYPE, Integer.TYPE, Integer.TYPE, Boolean.TYPE);
25   - @Deprecated public static final MethodInfo bindFramebufferTexture = new MethodInfo(Obf.FrameBuffer, Obf.bindFramebufferTexture, Void.TYPE);
26   - @Deprecated public static final MethodInfo sendChatMessage = new MethodInfo(Obf.EntityPlayerSP, Obf.sendChatMessage, Void.TYPE, String.class);
27   - @Deprecated public static final MethodInfo renderWorld = new MethodInfo(Obf.EntityRenderer, Obf.renderWorld, Void.TYPE, Float.TYPE, Long.TYPE);
28   - @Deprecated public static final MethodInfo renderWorldPass = new MethodInfo(Obf.EntityRenderer, Obf.renderWorldPass, Void.TYPE, Integer.TYPE, Float.TYPE, Long.TYPE);
29   - @Deprecated public static final MethodInfo updateCameraAndRender = new MethodInfo(Obf.EntityRenderer, Obf.updateCameraAndRender, Void.TYPE, Float.TYPE);
30   - @Deprecated public static final MethodInfo renderGameOverlay = new MethodInfo(Obf.GuiIngame, Obf.renderGameOverlay, Void.TYPE, Float.TYPE);
31   - @Deprecated public static final MethodInfo drawChat = new MethodInfo(Obf.GuiNewChat, Obf.drawChat, Void.TYPE, Integer.TYPE);
32   - @Deprecated public static final MethodInfo integratedServerCtor = new MethodInfo(Obf.IntegratedServer, Obf.constructor, Void.TYPE, Obf.Minecraft, String.class, String.class, Obf.WorldSettings);
33   - @Deprecated public static final MethodInfo initPlayerConnection = new MethodInfo(Obf.ServerConfigurationManager, Obf.initializeConnectionToPlayer, Void.TYPE, Obf.NetworkManager, Obf.EntityPlayerMP);
34   - @Deprecated public static final MethodInfo playerLoggedIn = new MethodInfo(Obf.ServerConfigurationManager, Obf.playerLoggedIn, Void.TYPE, Obf.EntityPlayerMP);
35   - @Deprecated public static final MethodInfo playerLoggedOut = new MethodInfo(Obf.ServerConfigurationManager, Obf.playerLoggedOut, Void.TYPE, Obf.EntityPlayerMP);
36   - @Deprecated public static final MethodInfo spawnPlayer = new MethodInfo(Obf.ServerConfigurationManager, Obf.spawnPlayer, Obf.EntityPlayerMP, Obf.GameProfile);
37   - @Deprecated public static final MethodInfo respawnPlayer = new MethodInfo(Obf.ServerConfigurationManager, Obf.respawnPlayer, Obf.EntityPlayerMP, Obf.EntityPlayerMP, Integer.TYPE, Boolean.TYPE);
38   - @Deprecated public static final MethodInfo glClear = new MethodInfo(Obf.GlStateManager, Obf.clear, Void.TYPE, Integer.TYPE);
39   - @Deprecated public static final MethodInfo getProfile = new MethodInfo(Obf.Session, Obf.getProfile, Obf.GameProfile);
40   - @Deprecated public static final MethodInfo saveScreenshot = new MethodInfo(Obf.ScreenShotHelper, Obf.saveScreenshot, Obf.IChatComponent, File.class, String.class, Integer.TYPE, Integer.TYPE, Obf.FrameBuffer);
41   - @Deprecated public static final MethodInfo isFramebufferEnabled = new MethodInfo(Obf.OpenGlHelper, Obf.isFramebufferEnabled, Boolean.TYPE);
42   - @Deprecated public static final MethodInfo doRenderEntity = new MethodInfo(Obf.RenderManager, Obf.doRenderEntity, Boolean.TYPE, Obf.Entity, Double.TYPE, Double.TYPE, Double.TYPE, Float.TYPE, Float.TYPE, Boolean.TYPE);
43   - @Deprecated public static final MethodInfo doRender = new MethodInfo(Obf.Render, Obf.doRender, Void.TYPE, Obf.Entity, Double.TYPE, Double.TYPE, Double.TYPE, Float.TYPE, Float.TYPE);
44   - @Deprecated public static final MethodInfo doRenderShadowAndFire = new MethodInfo(Obf.Render, Obf.doRenderShadowAndFire, Void.TYPE, Obf.Entity, Double.TYPE, Double.TYPE, Double.TYPE, Float.TYPE, Float.TYPE);
45   - @Deprecated public static final MethodInfo realmsPlay = new MethodInfo(Obf.RealmsMainScreen, "play", Void.TYPE, Long.TYPE);
46   - @Deprecated public static final MethodInfo realmsStopFetcher = new MethodInfo(Obf.RealmsMainScreen, "stopRealmsFetcherAndPinger", Void.TYPE);
47   - @Deprecated public static final MethodInfo onBlockClicked = new MethodInfo(Obf.ItemInWorldManager, Obf.onBlockClicked, Void.TYPE, Obf.BlockPos, Obf.EnumFacing);
48   - @Deprecated public static final MethodInfo activateBlockOrUseItem = new MethodInfo(Obf.ItemInWorldManager, Obf.activateBlockOrUseItem, Boolean.TYPE, Obf.EntityPlayer, Obf.World, Obf.ItemStack, Obf.BlockPos, Obf.EnumFacing, Float.TYPE, Float.TYPE, Float.TYPE);
49   - @Deprecated public static final MethodInfo processBlockPlacement = new MethodInfo(Obf.NetHandlerPlayServer, Obf.processPlayerBlockPlacement, Void.TYPE, Packets.C08PacketPlayerBlockPlacement);
50   - @Deprecated public static final MethodInfo handleAnimation = new MethodInfo(Obf.NetHandlerPlayServer, Obf.handleAnimation, Void.TYPE, Packets.C0APacketAnimation);
51   - @Deprecated public static final MethodInfo processPlayerDigging = new MethodInfo(Obf.NetHandlerPlayServer, Obf.processPlayerDigging, Void.TYPE, Packets.C07PacketPlayerDigging);
52   - @Deprecated public static final MethodInfo serverJobs = new MethodInfo(Obf.MinecraftServer, Obf.updateTimeLightAndEntities, Void.TYPE);
53   - @Deprecated public static final MethodInfo checkThreadAndEnqueue = new MethodInfo(Obf.PacketThreadUtil, Obf.checkThreadAndEnqueue);
54   - @Deprecated public static final MethodInfo processPlayer = new MethodInfo(Obf.NetHandlerPlayServer, Obf.processPlayer, Void.TYPE, Packets.C03PacketPlayer);
55   - @Deprecated public static final MethodInfo renderSky = new MethodInfo(Obf.RenderGlobal, Obf.renderSky, Void.TYPE, Float.TYPE, Integer.TYPE);
56   - @Deprecated public static final MethodInfo renderCloudsCheck = new MethodInfo(Obf.EntityRenderer, Obf.renderCloudsCheck, Void.TYPE, Obf.RenderGlobal, Float.TYPE, Integer.TYPE);
57   - @Deprecated public static final MethodInfo setupFog = new MethodInfo(Obf.EntityRenderer, Obf.setupFog, Void.TYPE, Integer.TYPE, Float.TYPE);
58   -
59   - // Profiler
60   - @Deprecated public static final MethodInfo startSection = new MethodInfo(Obf.Profiler, Obf.startSection, Void.TYPE, String.class);
61   - @Deprecated public static final MethodInfo endSection = new MethodInfo(Obf.Profiler, Obf.endSection, Void.TYPE);
62   - @Deprecated public static final MethodInfo endStartSection = new MethodInfo(Obf.Profiler, Obf.endStartSection, Void.TYPE, String.class);
63   -
64   - // Dedicated Server
65   - @Deprecated public static final MethodInfo startServer = new MethodInfo(Obf.DedicatedServer, Obf.startServer, Boolean.TYPE);
66   - @Deprecated public static final MethodInfo startServerThread = new MethodInfo(Obf.MinecraftServer, Obf.startServerThread, Void.TYPE);
67   -
68   - private Methods() {}
69   -
70   - private static final Map<String, MethodInfo> methodMap = new HashMap<String, MethodInfo>();
71   -
72   - static
73   - {
74   - try
75   - {
76   - for (Field fd : Methods.class.getFields())
77   - {
78   - if (fd.getType().equals(MethodInfo.class))
79   - {
80   - Methods.methodMap.put(fd.getName(), (MethodInfo)fd.get(null));
81   - }
82   - }
83   - }
84   - catch (IllegalAccessException ex) {}
85   - }
86   -
87   - public static MethodInfo getByName(String name)
88   - {
89   - return Methods.methodMap.get(name);
90   - }
91   -}
src/main/java/com/mumfrey/liteloader/core/runtime/Obf.java
1 1 package com.mumfrey.liteloader.core.runtime;
2 2  
3   -import java.io.IOException;
4   -import java.io.InputStream;
  3 +import java.io.File;
5 4 import java.lang.reflect.Field;
6 5 import java.util.HashMap;
7 6 import java.util.Map;
8   -import java.util.Properties;
  7 +
  8 +import org.spongepowered.asm.obfuscation.SrgField;
  9 +import org.spongepowered.asm.obfuscation.SrgMethod;
9 10  
10 11 /**
11 12 * Centralised obfuscation table for LiteLoader
12 13 *
13 14 * @author Adam Mummery-Smith
14   - * TODO Obfuscation 1.8
  15 + * TODO Obfuscation 1.8.9
15 16 */
16 17 public class Obf
17 18 {
... ... @@ -33,132 +34,31 @@ public class Obf
33 34 public static final Obf postInit = new Obf("postInit" );
34 35 public static final Obf constructor = new Obf("<init>" );
35 36  
36   - // Overlays and Accessor Interfaces
37   - // -----------------------------------------------------------------------------------------
38   - public static final Obf IMinecraft = new Obf("com.mumfrey.liteloader.client.overlays.IMinecraft" );
39   - public static final Obf IGuiTextField = new Obf("com.mumfrey.liteloader.client.overlays.IGuiTextField" );
40   - public static final Obf IEntityRenderer = new Obf("com.mumfrey.liteloader.client.overlays.IEntityRenderer" );
41   - public static final Obf ISoundHandler = new Obf("com.mumfrey.liteloader.client.overlays.ISoundHandler" );
42   -
43 37 // CHECKSTYLE:OFF
44 38  
45 39 // Classes
46 40 // -----------------------------------------------------------------------------------------
47   - public static final Obf Minecraft = new Obf("net.minecraft.client.Minecraft", "bsu" );
48   - public static final Obf EntityRenderer = new Obf("net.minecraft.client.renderer.EntityRenderer", "cji" );
49   - public static final Obf Blocks = new Obf("net.minecraft.init.Blocks", "aty" );
50   - public static final Obf CrashReport$6 = new Obf("net.minecraft.crash.CrashReport$6", "h" );
51   - public static final Obf INetHandler = new Obf("net.minecraft.network.INetHandler", "hg" );
52   - public static final Obf Items = new Obf("net.minecraft.init.Items", "amk" );
  41 + public static final Obf Minecraft = new Obf("net.minecraft.client.Minecraft", "ave" );
  42 + public static final Obf EntityRenderer = new Obf("net.minecraft.client.renderer.EntityRenderer", "bfk" );
  43 + public static final Obf Blocks = new Obf("net.minecraft.init.Blocks", "afi" );
  44 + public static final Obf CrashReport$6 = new Obf("net.minecraft.crash.CrashReport$6", "b$6" );
  45 + public static final Obf INetHandler = new Obf("net.minecraft.network.INetHandler", "ep" );
  46 + public static final Obf Items = new Obf("net.minecraft.init.Items", "zy" );
  47 + public static final Obf Profiler = new Obf("net.minecraft.profiler.Profiler", "ny" );
  48 + public static final Obf TileEntity = new Obf("net.minecraft.tileentity.TileEntity", "akw" );
53 49  
54 50 // Fields
55 51 // -----------------------------------------------------------------------------------------
56   - public static final Obf tileEntityNameToClassMap = new Obf("field_145855_i", "f" );
57   - public static final Obf tileEntityClassToNameMap = new Obf("field_145853_j", "g" );
  52 + public static final Obf tileEntityNameToClassMap = new Obf(Obf.TileEntity, "field_145855_i", "f" );
  53 + public static final Obf tileEntityClassToNameMap = new Obf(Obf.TileEntity, "field_145853_j", "g" );
58 54  
59 55 // Methods
60 56 // -----------------------------------------------------------------------------------------
61   - public static final Obf startGame = new Obf("func_71384_a", "aj" );
62   - public static final Obf startSection = new Obf("func_76320_a", "a" );
63   - public static final Obf endSection = new Obf("func_76319_b", "b" );
64   - public static final Obf endStartSection = new Obf("func_76318_c", "c" );
65   - public static final Obf processPacket = new Obf("func_148833_a", "a" );
66   -
67   - // Legacy
68   - // -----------------------------------------------------------------------------------------
69   - @Deprecated public static final Obf GuiIngame = new Obf("net.minecraft.client.gui.GuiIngame", "btz" );
70   - @Deprecated public static final Obf Profiler = new Obf("net.minecraft.profiler.Profiler", "uw" );
71   - @Deprecated public static final Obf IntegratedServer = new Obf("net.minecraft.server.integrated.IntegratedServer", "cyk" );
72   - @Deprecated public static final Obf WorldSettings = new Obf("net.minecraft.world.WorldSettings", "arb" );
73   - @Deprecated public static final Obf ServerConfigurationManager = new Obf("net.minecraft.server.management.ServerConfigurationManager", "sn" );
74   - @Deprecated public static final Obf EntityPlayerMP = new Obf("net.minecraft.entity.player.EntityPlayerMP", "qw" );
75   - @Deprecated public static final Obf NetworkManager = new Obf("net.minecraft.network.NetworkManager", "gr" );
76   - @Deprecated public static final Obf DedicatedServer = new Obf("net.minecraft.server.dedicated.DedicatedServer", "po" );
77   - @Deprecated public static final Obf EntityPlayerSP = new Obf("net.minecraft.client.entity.EntityPlayerSP", "cio" );
78   - @Deprecated public static final Obf FrameBuffer = new Obf("net.minecraft.client.shader.Framebuffer", "ckw" );
79   - @Deprecated public static final Obf GuiNewChat = new Obf("net.minecraft.client.gui.GuiNewChat", "buh" );
80   - @Deprecated public static final Obf GlStateManager = new Obf("net.minecraft.client.renderer.GlStateManager", "cjm" );
81   - @Deprecated public static final Obf Session = new Obf("net.minecraft.util.Session", "btw" );
82   - @Deprecated public static final Obf IChatComponent = new Obf("net.minecraft.util.IChatComponent", "ho" );
83   - @Deprecated public static final Obf ScreenShotHelper = new Obf("net.minecraft.util.ScreenShotHelper", "btt" );
84   - @Deprecated public static final Obf OpenGlHelper = new Obf("net.minecraft.client.renderer.OpenGlHelper", "dax" );
85   - @Deprecated public static final Obf Entity = new Obf("net.minecraft.entity.Entity", "wv" );
86   - @Deprecated public static final Obf RenderManager = new Obf("net.minecraft.client.renderer.entity.RenderManager", "cpt" );
87   - @Deprecated public static final Obf Render = new Obf("net.minecraft.client.renderer.entity.Render", "cpu" );
88   - @Deprecated public static final Obf GuiTextField = new Obf("net.minecraft.client.gui.GuiTextField", "bul" );
89   - @Deprecated public static final Obf SoundHandler = new Obf("net.minecraft.client.audio.SoundHandler", "czh" );
90   - @Deprecated public static final Obf BlockPos = new Obf("net.minecraft.util.BlockPos", "dt" );
91   - @Deprecated public static final Obf EnumFacing = new Obf("net.minecraft.util.EnumFacing", "ej" );
92   - @Deprecated public static final Obf ItemInWorldManager = new Obf("net.minecraft.server.management.ItemInWorldManager", "qx" );
93   - @Deprecated public static final Obf NetHandlerPlayServer = new Obf("net.minecraft.network.NetHandlerPlayServer", "rj" );
94   - @Deprecated public static final Obf EntityPlayer = new Obf("net.minecraft.entity.player.EntityPlayer", "ahd" );
95   - @Deprecated public static final Obf World = new Obf("net.minecraft.world.World", "aqu" );
96   - @Deprecated public static final Obf ItemStack = new Obf("net.minecraft.item.ItemStack", "amj" );
97   - @Deprecated public static final Obf PacketThreadUtil = new Obf("net.minecraft.network.PacketThreadUtil", "ig" );
98   - @Deprecated public static final Obf RenderGlobal = new Obf("net.minecraft.client.renderer.RenderGlobal", "ckn" );
99   - @Deprecated public static final Obf minecraftProfiler = new Obf("field_71424_I", "y" );
100   - @Deprecated public static final Obf entityRenderMap = new Obf("field_78729_o", "k" );
101   - @Deprecated public static final Obf reloadListeners = new Obf("field_110546_b", "d" );
102   - @Deprecated public static final Obf networkManager = new Obf("field_147393_d", "d" );
103   - @Deprecated public static final Obf registryObjects = new Obf("field_82596_a", "c" );
104   - @Deprecated public static final Obf underlyingIntegerMap = new Obf("field_148759_a", "a" );
105   - @Deprecated public static final Obf identityMap = new Obf("field_148749_a", "a" );
106   - @Deprecated public static final Obf objectList = new Obf("field_148748_b", "b" );
107   - @Deprecated public static final Obf mapSpecialRenderers = new Obf("field_147559_m", "m" );
108   - @Deprecated public static final Obf timer = new Obf("field_71428_T", "U" );
109   - @Deprecated public static final Obf mcProfiler = new Obf("field_71424_I", "y" );
110   - @Deprecated public static final Obf running = new Obf("field_71425_J", "z" );
111   - @Deprecated public static final Obf defaultResourcePacks = new Obf("field_110449_ao", "aw" );
112   - @Deprecated public static final Obf serverName = new Obf("field_71475_ae", "am" );
113   - @Deprecated public static final Obf serverPort = new Obf("field_71477_af", "an" );
114   - @Deprecated public static final Obf shaderResourceLocations = new Obf("field_147712_ad", "ab" );
115   - @Deprecated public static final Obf shaderIndex = new Obf("field_147713_ae", "ac" );
116   - @Deprecated public static final Obf useShader = new Obf("field_175083_ad", "ad" );
117   - @Deprecated public static final Obf viewDistance = new Obf("field_149528_b", "b" );
118   - @Deprecated public static final Obf entityPosY = new Obf("field_70163_u", "t" );
119   - @Deprecated public static final Obf chatComponent = new Obf("field_148919_a", "a" );
120   - @Deprecated public static final Obf runGameLoop = new Obf("func_71411_J", "as" );
121   - @Deprecated public static final Obf runTick = new Obf("func_71407_l", "r" );
122   - @Deprecated public static final Obf updateCameraAndRender = new Obf("func_78480_b", "b" );
123   - @Deprecated public static final Obf renderWorld = new Obf("func_78471_a", "a" );
124   - @Deprecated public static final Obf renderGameOverlay = new Obf("func_175180_a", "a" );
125   - @Deprecated public static final Obf spawnPlayer = new Obf("func_148545_a", "f" );
126   - @Deprecated public static final Obf respawnPlayer = new Obf("func_72368_a", "a" );
127   - @Deprecated public static final Obf initializeConnectionToPlayer = new Obf("func_72355_a", "a" );
128   - @Deprecated public static final Obf playerLoggedIn = new Obf("func_72377_c", "c" );
129   - @Deprecated public static final Obf playerLoggedOut = new Obf("func_72367_e", "e" );
130   - @Deprecated public static final Obf startServer = new Obf("func_71197_b", "i" );
131   - @Deprecated public static final Obf startServerThread = new Obf("func_71256_s", "B" );
132   - @Deprecated public static final Obf sendChatMessage = new Obf("func_71165_d", "e" );
133   - @Deprecated public static final Obf updateFramebufferSize = new Obf("func_147119_ah", "av" );
134   - @Deprecated public static final Obf framebufferRender = new Obf("func_147615_c", "c" );
135   - @Deprecated public static final Obf framebufferRenderExt = new Obf("func_178038_a", "a" );
136   - @Deprecated public static final Obf bindFramebufferTexture = new Obf("func_147612_c", "c" );
137   - @Deprecated public static final Obf drawChat = new Obf("func_146230_a", "a" );
138   - @Deprecated public static final Obf clear = new Obf("func_179086_m", "m" );
139   - @Deprecated public static final Obf renderWorldPass = new Obf("func_175068_a", "a" );
140   - @Deprecated public static final Obf getProfile = new Obf("func_148256_e", "a" );
141   - @Deprecated public static final Obf saveScreenshot = new Obf("func_148260_a", "a" );
142   - @Deprecated public static final Obf isFramebufferEnabled = new Obf("func_148822_b", "i" );
143   - @Deprecated public static final Obf doRenderEntity = new Obf("func_147939_a", "a" );
144   - @Deprecated public static final Obf doRender = new Obf("func_76986_a", "a" );
145   - @Deprecated public static final Obf doRenderShadowAndFire = new Obf("func_76979_b", "b" );
146   - @Deprecated public static final Obf resize = new Obf("func_71370_a", "a" );
147   - @Deprecated public static final Obf loadShader = new Obf("func_175069_a", "a" );
148   - @Deprecated public static final Obf getFOVModifier = new Obf("func_78481_a", "a" );
149   - @Deprecated public static final Obf setupCameraTransform = new Obf("func_78479_a", "a" );
150   - @Deprecated public static final Obf loadSoundResource = new Obf("func_147693_a", "a" );
151   - @Deprecated public static final Obf onBlockClicked = new Obf("func_180784_a", "a" );
152   - @Deprecated public static final Obf activateBlockOrUseItem = new Obf("func_180236_a", "a" );
153   - @Deprecated public static final Obf processPlayerBlockPlacement = new Obf("func_147346_a", "a" );
154   - @Deprecated public static final Obf handleAnimation = new Obf("func_175087_a", "a" );
155   - @Deprecated public static final Obf processPlayerDigging = new Obf("func_147345_a", "a" );
156   - @Deprecated public static final Obf updateTimeLightAndEntities = new Obf("func_71190_q", "z" );
157   - @Deprecated public static final Obf checkThreadAndEnqueue = new Obf("func_180031_a", "a" );
158   - @Deprecated public static final Obf processPlayer = new Obf("func_147347_a", "a" );
159   - @Deprecated public static final Obf renderSky = new Obf("func_174976_a", "a" );
160   - @Deprecated public static final Obf renderCloudsCheck = new Obf("func_180437_a", "a" );
161   - @Deprecated public static final Obf setupFog = new Obf("func_78468_a", "a" );
  57 + public static final Obf startGame = new Obf(Obf.Minecraft, "func_71384_a", "am" );
  58 + public static final Obf startSection = new Obf(Obf.Profiler, "func_76320_a", "a" );
  59 + public static final Obf endSection = new Obf(Obf.Profiler, "func_76319_b", "b" );
  60 + public static final Obf endStartSection = new Obf(Obf.Profiler, "func_76318_c", "c" );
  61 + public static final Obf processPacket = new Obf(Packets.S12PacketEntityVelocity, "func_148833_a", "a" );
162 62  
163 63 // CHECKSTYLE:ON
164 64  
... ... @@ -166,7 +66,7 @@ public class Obf
166 66 public static final int SRG = 1;
167 67 public static final int OBF = 2;
168 68  
169   - private static Properties mcpNames;
  69 + private static SrgContainer srgs;
170 70  
171 71 private static final Map<String, Obf> obfs = new HashMap<String, Obf>();
172 72  
... ... @@ -226,6 +126,15 @@ public class Obf
226 126 {
227 127 this(seargeName, obfName, null);
228 128 }
  129 +
  130 + /**
  131 + * @param seargeName
  132 + * @param obfName
  133 + */
  134 + protected Obf(Obf owner, String seargeName, String obfName)
  135 + {
  136 + this(owner, seargeName, obfName, null);
  137 + }
229 138  
230 139 /**
231 140 * @param seargeName
... ... @@ -234,7 +143,12 @@ public class Obf
234 143 */
235 144 protected Obf(String seargeName, String obfName, String mcpName)
236 145 {
237   - this.name = mcpName != null ? mcpName : this.getDeobfuscatedName(seargeName);
  146 + this(null, seargeName, obfName, mcpName);
  147 + }
  148 +
  149 + private Obf(Obf owner, String seargeName, String obfName, String mcpName)
  150 + {
  151 + this.name = mcpName != null ? mcpName : this.getDeobfuscatedName(owner, seargeName);
238 152 this.ref = this.name.replace('.', '/');
239 153 this.srg = seargeName;
240 154 this.obf = obfName;
... ... @@ -302,37 +216,55 @@ public class Obf
302 216 /**
303 217 * @param seargeName
304 218 */
305   - protected String getDeobfuscatedName(String seargeName)
  219 + protected String getDeobfuscatedName(Obf owner, String seargeName)
306 220 {
307   - return Obf.getDeobfName(seargeName);
  221 + return Obf.getDeobfName(owner, seargeName);
308 222 }
309 223  
310 224 /**
311 225 * @param seargeName
312 226 */
313   - static String getDeobfName(String seargeName)
  227 + static String getDeobfName(Obf owner, String seargeName)
314 228 {
315   - if (Obf.mcpNames == null)
  229 + if (owner == null)
  230 + {
  231 + return seargeName;
  232 + }
  233 +
  234 + if (Obf.srgs == null)
316 235 {
317   - Obf.mcpNames = new Properties();
318   - InputStream is = Obf.class.getResourceAsStream("/obfuscation.properties");
319   - if (is != null)
  236 + Obf.srgs = new SrgContainer();
  237 + String srgFileName = System.getProperty("net.minecraftforge.gradle.GradleStart.srg.srg-mcp");
  238 + if (srgFileName != null)
320 239 {
321 240 try
322 241 {
323   - Obf.mcpNames.load(is);
  242 + File srgFile = new File(srgFileName);
  243 + if (srgFile.isFile())
  244 + {
  245 + Obf.srgs.readSrg(srgFile);
  246 + }
324 247 }
325   - catch (IOException ex) {}
326   -
327   - try
  248 + catch (Exception ex)
328 249 {
329   - is.close();
  250 + ex.printStackTrace();
330 251 }
331   - catch (IOException ex) {}
332 252 }
333 253 }
  254 +
  255 + SrgField field = Obf.srgs.getFieldMapping(owner.ref, seargeName, false);
  256 + if (field != null)
  257 + {
  258 + return field.getName();
  259 + }
  260 +
  261 + SrgMethod method = Obf.srgs.getMethodMapping(owner.ref, seargeName, false);
  262 + if (method != null)
  263 + {
  264 + return method.getSimpleName();
  265 + }
334 266  
335   - return Obf.mcpNames.getProperty(seargeName, seargeName);
  267 + return seargeName;
336 268 }
337 269  
338 270 /**
... ...
src/main/java/com/mumfrey/liteloader/core/runtime/Packets.java
... ... @@ -7,7 +7,7 @@ import java.util.Map;
7 7 * Packet obfuscation table
8 8 *
9 9 * @author Adam Mummery-Smith
10   - * TODO Obfuscation 1.8
  10 + * TODO Obfuscation 1.8.9
11 11 */
12 12 public final class Packets extends Obf
13 13 {
... ... @@ -32,117 +32,117 @@ public final class Packets extends Obf
32 32  
33 33 private static Map<String, Packets> packetMap = new HashMap<String, Packets>();
34 34  
35   - public static Packets S08PacketPlayerPosLook = new Packets("net.minecraft.network.play.server.S08PacketPlayerPosLook", "ii", Context.CLIENT);
36   - public static Packets S0EPacketSpawnObject = new Packets("net.minecraft.network.play.server.S0EPacketSpawnObject", "il", Context.CLIENT);
37   - public static Packets S11PacketSpawnExperienceOrb = new Packets("net.minecraft.network.play.server.S11PacketSpawnExperienceOrb", "im", Context.CLIENT);
38   - public static Packets S2CPacketSpawnGlobalEntity = new Packets("net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity", "in", Context.CLIENT);
39   - public static Packets S0FPacketSpawnMob = new Packets("net.minecraft.network.play.server.S0FPacketSpawnMob", "io", Context.CLIENT);
40   - public static Packets S10PacketSpawnPainting = new Packets("net.minecraft.network.play.server.S10PacketSpawnPainting", "ip", Context.CLIENT);
41   - public static Packets S0CPacketSpawnPlayer = new Packets("net.minecraft.network.play.server.S0CPacketSpawnPlayer", "iq", Context.CLIENT);
42   - public static Packets S0BPacketAnimation = new Packets("net.minecraft.network.play.server.S0BPacketAnimation", "ir", Context.CLIENT);
43   - public static Packets S37PacketStatistics = new Packets("net.minecraft.network.play.server.S37PacketStatistics", "is", Context.CLIENT);
44   - public static Packets S25PacketBlockBreakAnim = new Packets("net.minecraft.network.play.server.S25PacketBlockBreakAnim", "it", Context.CLIENT);
45   - public static Packets S35PacketUpdateTileEntity = new Packets("net.minecraft.network.play.server.S35PacketUpdateTileEntity", "iu", Context.CLIENT);
46   - public static Packets S24PacketBlockAction = new Packets("net.minecraft.network.play.server.S24PacketBlockAction", "iv", Context.CLIENT);
47   - public static Packets S23PacketBlockChange = new Packets("net.minecraft.network.play.server.S23PacketBlockChange", "iw", Context.CLIENT);
48   - public static Packets S41PacketServerDifficulty = new Packets("net.minecraft.network.play.server.S41PacketServerDifficulty", "ix", Context.CLIENT);
49   - public static Packets S3APacketTabComplete = new Packets("net.minecraft.network.play.server.S3APacketTabComplete", "iy", Context.CLIENT);
50   - public static Packets S02PacketChat = new Packets("net.minecraft.network.play.server.S02PacketChat", "iz", Context.CLIENT);
51   - public static Packets S22PacketMultiBlockChange = new Packets("net.minecraft.network.play.server.S22PacketMultiBlockChange", "ja", Context.CLIENT);
52   - public static Packets S32PacketConfirmTransaction = new Packets("net.minecraft.network.play.server.S32PacketConfirmTransaction", "jc", Context.CLIENT);
53   - public static Packets S2EPacketCloseWindow = new Packets("net.minecraft.network.play.server.S2EPacketCloseWindow", "jd", Context.CLIENT);
54   - public static Packets S2DPacketOpenWindow = new Packets("net.minecraft.network.play.server.S2DPacketOpenWindow", "je", Context.CLIENT);
55   - public static Packets S30PacketWindowItems = new Packets("net.minecraft.network.play.server.S30PacketWindowItems", "jf", Context.CLIENT);
56   - public static Packets S31PacketWindowProperty = new Packets("net.minecraft.network.play.server.S31PacketWindowProperty", "jg", Context.CLIENT);
57   - public static Packets S2FPacketSetSlot = new Packets("net.minecraft.network.play.server.S2FPacketSetSlot", "jh", Context.CLIENT);
58   - public static Packets S3FPacketCustomPayload = new Packets("net.minecraft.network.play.server.S3FPacketCustomPayload", "ji", Context.CLIENT);
59   - public static Packets S40PacketDisconnect = new Packets("net.minecraft.network.play.server.S40PacketDisconnect", "jj", Context.CLIENT);
60   - public static Packets S19PacketEntityStatus = new Packets("net.minecraft.network.play.server.S19PacketEntityStatus", "jk", Context.CLIENT);
61   - public static Packets S49PacketUpdateEntityNBT = new Packets("net.minecraft.network.play.server.S49PacketUpdateEntityNBT", "jl", Context.CLIENT);
62   - public static Packets S27PacketExplosion = new Packets("net.minecraft.network.play.server.S27PacketExplosion", "jm", Context.CLIENT);
63   - public static Packets S46PacketSetCompressionLevel = new Packets("net.minecraft.network.play.server.S46PacketSetCompressionLevel", "jn", Context.CLIENT);
64   - public static Packets S2BPacketChangeGameState = new Packets("net.minecraft.network.play.server.S2BPacketChangeGameState", "jo", Context.CLIENT);
65   - public static Packets S00PacketKeepAlive = new Packets("net.minecraft.network.play.server.S00PacketKeepAlive", "jp", Context.CLIENT);
66   - public static Packets S21PacketChunkData = new Packets("net.minecraft.network.play.server.S21PacketChunkData", "jq", Context.CLIENT);
67   - public static Packets S26PacketMapChunkBulk = new Packets("net.minecraft.network.play.server.S26PacketMapChunkBulk", "js", Context.CLIENT);
68   - public static Packets S28PacketEffect = new Packets("net.minecraft.network.play.server.S28PacketEffect", "jt", Context.CLIENT);
69   - public static Packets S2APacketParticles = new Packets("net.minecraft.network.play.server.S2APacketParticles", "ju", Context.CLIENT);
70   - public static Packets S29PacketSoundEffect = new Packets("net.minecraft.network.play.server.S29PacketSoundEffect", "jv", Context.CLIENT);
71   - public static Packets S01PacketJoinGame = new Packets("net.minecraft.network.play.server.S01PacketJoinGame", "jw", Context.CLIENT);
72   - public static Packets S34PacketMaps = new Packets("net.minecraft.network.play.server.S34PacketMaps", "jx", Context.CLIENT);
73   - public static Packets S14PacketEntity = new Packets("net.minecraft.network.play.server.S14PacketEntity", "jy", Context.CLIENT);
74   - public static Packets S15PacketEntityRelMove = new Packets("net.minecraft.network.play.server.S14PacketEntity$S15PacketEntityRelMove", "jz", Context.CLIENT);
75   - public static Packets S17PacketEntityLookMove = new Packets("net.minecraft.network.play.server.S14PacketEntity$S17PacketEntityLookMove", "ka", Context.CLIENT);
76   - public static Packets S16PacketEntityLook = new Packets("net.minecraft.network.play.server.S14PacketEntity$S16PacketEntityLook", "kb", Context.CLIENT);
77   - public static Packets S36PacketSignEditorOpen = new Packets("net.minecraft.network.play.server.S36PacketSignEditorOpen", "kc", Context.CLIENT);
78   - public static Packets S39PacketPlayerAbilities = new Packets("net.minecraft.network.play.server.S39PacketPlayerAbilities", "kd", Context.CLIENT);
79   - public static Packets S42PacketCombatEvent = new Packets("net.minecraft.network.play.server.S42PacketCombatEvent", "ke", Context.CLIENT);
80   - public static Packets S38PacketPlayerListItem = new Packets("net.minecraft.network.play.server.S38PacketPlayerListItem", "kh", Context.CLIENT);
81   - public static Packets S0APacketUseBed = new Packets("net.minecraft.network.play.server.S0APacketUseBed", "kl", Context.CLIENT);
82   - public static Packets S13PacketDestroyEntities = new Packets("net.minecraft.network.play.server.S13PacketDestroyEntities", "km", Context.CLIENT);
83   - public static Packets S1EPacketRemoveEntityEffect = new Packets("net.minecraft.network.play.server.S1EPacketRemoveEntityEffect", "kn", Context.CLIENT);
84   - public static Packets S48PacketResourcePackSend = new Packets("net.minecraft.network.play.server.S48PacketResourcePackSend", "ko", Context.CLIENT);
85   - public static Packets S07PacketRespawn = new Packets("net.minecraft.network.play.server.S07PacketRespawn", "kp", Context.CLIENT);
86   - public static Packets S19PacketEntityHeadLook = new Packets("net.minecraft.network.play.server.S19PacketEntityHeadLook", "kq", Context.CLIENT);
87   - public static Packets S44PacketWorldBorder = new Packets("net.minecraft.network.play.server.S44PacketWorldBorder", "kr", Context.CLIENT);
88   - public static Packets S43PacketCamera = new Packets("net.minecraft.network.play.server.S43PacketCamera", "ku", Context.CLIENT);
89   - public static Packets S09PacketHeldItemChange = new Packets("net.minecraft.network.play.server.S09PacketHeldItemChange", "kv", Context.CLIENT);
90   - public static Packets S3DPacketDisplayScoreboard = new Packets("net.minecraft.network.play.server.S3DPacketDisplayScoreboard", "kw", Context.CLIENT);
91   - public static Packets S1CPacketEntityMetadata = new Packets("net.minecraft.network.play.server.S1CPacketEntityMetadata", "kx", Context.CLIENT);
92   - public static Packets S1BPacketEntityAttach = new Packets("net.minecraft.network.play.server.S1BPacketEntityAttach", "ky", Context.CLIENT);
93   - public static Packets S12PacketEntityVelocity = new Packets("net.minecraft.network.play.server.S12PacketEntityVelocity", "kz", Context.CLIENT);
94   - public static Packets S04PacketEntityEquipment = new Packets("net.minecraft.network.play.server.S04PacketEntityEquipment", "la", Context.CLIENT);
95   - public static Packets S1FPacketSetExperience = new Packets("net.minecraft.network.play.server.S1FPacketSetExperience", "lb", Context.CLIENT);
96   - public static Packets S06PacketUpdateHealth = new Packets("net.minecraft.network.play.server.S06PacketUpdateHealth", "lc", Context.CLIENT);
97   - public static Packets S3BPacketScoreboardObjective = new Packets("net.minecraft.network.play.server.S3BPacketScoreboardObjective", "ld", Context.CLIENT);
98   - public static Packets S3EPacketTeams = new Packets("net.minecraft.network.play.server.S3EPacketTeams", "le", Context.CLIENT);
99   - public static Packets S3CPacketUpdateScore = new Packets("net.minecraft.network.play.server.S3CPacketUpdateScore", "lf", Context.CLIENT);
100   - public static Packets S05PacketSpawnPosition = new Packets("net.minecraft.network.play.server.S05PacketSpawnPosition", "lh", Context.CLIENT);
101   - public static Packets S03PacketTimeUpdate = new Packets("net.minecraft.network.play.server.S03PacketTimeUpdate", "li", Context.CLIENT);
102   - public static Packets S45PacketTitle = new Packets("net.minecraft.network.play.server.S45PacketTitle", "lj", Context.CLIENT);
103   - public static Packets S33PacketUpdateSign = new Packets("net.minecraft.network.play.server.S33PacketUpdateSign", "ll", Context.CLIENT);
104   - public static Packets S47PacketPlayerListHeaderFooter = new Packets("net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter", "lm", Context.CLIENT);
105   - public static Packets S0DPacketCollectItem = new Packets("net.minecraft.network.play.server.S0DPacketCollectItem", "ln", Context.CLIENT);
106   - public static Packets S18PacketEntityTeleport = new Packets("net.minecraft.network.play.server.S18PacketEntityTeleport", "lo", Context.CLIENT);
107   - public static Packets S20PacketEntityProperties = new Packets("net.minecraft.network.play.server.S20PacketEntityProperties", "lp", Context.CLIENT);
108   - public static Packets S1DPacketEntityEffect = new Packets("net.minecraft.network.play.server.S1DPacketEntityEffect", "lr", Context.CLIENT);
109   - public static Packets C14PacketTabComplete = new Packets("net.minecraft.network.play.client.C14PacketTabComplete", "lt", Context.SERVER);
110   - public static Packets C01PacketChatMessage = new Packets("net.minecraft.network.play.client.C01PacketChatMessage", "lu", Context.SERVER);
111   - public static Packets C16PacketClientStatus = new Packets("net.minecraft.network.play.client.C16PacketClientStatus", "lv", Context.SERVER);
112   - public static Packets C15PacketClientSettings = new Packets("net.minecraft.network.play.client.C15PacketClientSettings", "lx", Context.SERVER);
113   - public static Packets C0FPacketConfirmTransaction = new Packets("net.minecraft.network.play.client.C0FPacketConfirmTransaction", "ly", Context.SERVER);
114   - public static Packets C11PacketEnchantItem = new Packets("net.minecraft.network.play.client.C11PacketEnchantItem", "lz", Context.SERVER);
115   - public static Packets C0EPacketClickWindow = new Packets("net.minecraft.network.play.client.C0EPacketClickWindow", "ma", Context.SERVER);
116   - public static Packets C0DPacketCloseWindow = new Packets("net.minecraft.network.play.client.C0DPacketCloseWindow", "mb", Context.SERVER);
117   - public static Packets C17PacketCustomPayload = new Packets("net.minecraft.network.play.client.C17PacketCustomPayload", "mc", Context.SERVER);
118   - public static Packets C02PacketUseEntity = new Packets("net.minecraft.network.play.client.C02PacketUseEntity", "md", Context.SERVER);
119   - public static Packets C00PacketKeepAlive = new Packets("net.minecraft.network.play.client.C00PacketKeepAlive", "mf", Context.SERVER);
120   - public static Packets C03PacketPlayer = new Packets("net.minecraft.network.play.client.C03PacketPlayer", "mg", Context.SERVER);
121   - public static Packets C04PacketPlayerPosition = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition", "mh", Context.SERVER);
122   - public static Packets C06PacketPlayerPosLook = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook", "mi", Context.SERVER);
123   - public static Packets C05PacketPlayerLook = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C05PacketPlayerLook", "mj", Context.SERVER);
124   - public static Packets C13PacketPlayerAbilities = new Packets("net.minecraft.network.play.client.C13PacketPlayerAbilities", "mk", Context.SERVER);
125   - public static Packets C07PacketPlayerDigging = new Packets("net.minecraft.network.play.client.C07PacketPlayerDigging", "ml", Context.SERVER);
126   - public static Packets C0BPacketEntityAction = new Packets("net.minecraft.network.play.client.C0BPacketEntityAction", "mn", Context.SERVER);
127   - public static Packets C0CPacketInput = new Packets("net.minecraft.network.play.client.C0CPacketInput", "mp", Context.SERVER);
128   - public static Packets C19PacketResourcePackStatus = new Packets("net.minecraft.network.play.client.C19PacketResourcePackStatus", "mq", Context.SERVER);
129   - public static Packets C09PacketHeldItemChange = new Packets("net.minecraft.network.play.client.C09PacketHeldItemChange", "ms", Context.SERVER);
130   - public static Packets C10PacketCreativeInventoryAction = new Packets("net.minecraft.network.play.client.C10PacketCreativeInventoryAction", "mt", Context.SERVER);
131   - public static Packets C12PacketUpdateSign = new Packets("net.minecraft.network.play.client.C12PacketUpdateSign", "mu", Context.SERVER);
132   - public static Packets C0APacketAnimation = new Packets("net.minecraft.network.play.client.C0APacketAnimation", "mv", Context.SERVER);
133   - public static Packets C18PacketSpectate = new Packets("net.minecraft.network.play.client.C18PacketSpectate", "mw", Context.SERVER);
134   - public static Packets C08PacketPlayerBlockPlacement = new Packets("net.minecraft.network.play.client.C08PacketPlayerBlockPlacement", "mx", Context.SERVER);
135   - public static Packets C00Handshake = new Packets("net.minecraft.network.handshake.client.C00Handshake", "mz", Context.SERVER);
136   - public static Packets S02PacketLoginSuccess = new Packets("net.minecraft.network.login.server.S02PacketLoginSuccess", "nd", Context.CLIENT);
137   - public static Packets S01PacketEncryptionRequest = new Packets("net.minecraft.network.login.server.S01PacketEncryptionRequest", "ne", Context.CLIENT);
138   - public static Packets S03PacketEnableCompression = new Packets("net.minecraft.network.login.server.S03PacketEnableCompression", "nf", Context.CLIENT);
139   - public static Packets S00PacketDisconnect = new Packets("net.minecraft.network.login.server.S00PacketDisconnect", "ng", Context.CLIENT);
140   - public static Packets C00PacketLoginStart = new Packets("net.minecraft.network.login.client.C00PacketLoginStart", "ni", Context.SERVER);
141   - public static Packets C01PacketEncryptionResponse = new Packets("net.minecraft.network.login.client.C01PacketEncryptionResponse", "nj", Context.SERVER);
142   - public static Packets S01PacketPong = new Packets("net.minecraft.network.status.server.S01PacketPong", "nn", Context.CLIENT);
143   - public static Packets S00PacketServerInfo = new Packets("net.minecraft.network.status.server.S00PacketServerInfo", "no", Context.CLIENT);
144   - public static Packets C01PacketPing = new Packets("net.minecraft.network.status.client.C01PacketPing", "nw", Context.SERVER);
145   - public static Packets C00PacketServerQuery = new Packets("net.minecraft.network.status.client.C00PacketServerQuery", "nx", Context.SERVER);
  35 + public static Packets S08PacketPlayerPosLook = new Packets("net.minecraft.network.play.server.S08PacketPlayerPosLook", "fi", Context.CLIENT);
  36 + public static Packets S0EPacketSpawnObject = new Packets("net.minecraft.network.play.server.S0EPacketSpawnObject", "fk", Context.CLIENT);
  37 + public static Packets S11PacketSpawnExperienceOrb = new Packets("net.minecraft.network.play.server.S11PacketSpawnExperienceOrb", "fl", Context.CLIENT);
  38 + public static Packets S2CPacketSpawnGlobalEntity = new Packets("net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity", "fm", Context.CLIENT);
  39 + public static Packets S0FPacketSpawnMob = new Packets("net.minecraft.network.play.server.S0FPacketSpawnMob", "fn", Context.CLIENT);
  40 + public static Packets S10PacketSpawnPainting = new Packets("net.minecraft.network.play.server.S10PacketSpawnPainting", "fo", Context.CLIENT);
  41 + public static Packets S0CPacketSpawnPlayer = new Packets("net.minecraft.network.play.server.S0CPacketSpawnPlayer", "fp", Context.CLIENT);
  42 + public static Packets S0BPacketAnimation = new Packets("net.minecraft.network.play.server.S0BPacketAnimation", "fq", Context.CLIENT);
  43 + public static Packets S37PacketStatistics = new Packets("net.minecraft.network.play.server.S37PacketStatistics", "fr", Context.CLIENT);
  44 + public static Packets S25PacketBlockBreakAnim = new Packets("net.minecraft.network.play.server.S25PacketBlockBreakAnim", "fs", Context.CLIENT);
  45 + public static Packets S35PacketUpdateTileEntity = new Packets("net.minecraft.network.play.server.S35PacketUpdateTileEntity", "ft", Context.CLIENT);
  46 + public static Packets S24PacketBlockAction = new Packets("net.minecraft.network.play.server.S24PacketBlockAction", "fu", Context.CLIENT);
  47 + public static Packets S23PacketBlockChange = new Packets("net.minecraft.network.play.server.S23PacketBlockChange", "fv", Context.CLIENT);
  48 + public static Packets S41PacketServerDifficulty = new Packets("net.minecraft.network.play.server.S41PacketServerDifficulty", "fw", Context.CLIENT);
  49 + public static Packets S3APacketTabComplete = new Packets("net.minecraft.network.play.server.S3APacketTabComplete", "fx", Context.CLIENT);
  50 + public static Packets S02PacketChat = new Packets("net.minecraft.network.play.server.S02PacketChat", "fy", Context.CLIENT);
  51 + public static Packets S22PacketMultiBlockChange = new Packets("net.minecraft.network.play.server.S22PacketMultiBlockChange", "fz", Context.CLIENT);
  52 + public static Packets S32PacketConfirmTransaction = new Packets("net.minecraft.network.play.server.S32PacketConfirmTransaction", "ga", Context.CLIENT);
  53 + public static Packets S2EPacketCloseWindow = new Packets("net.minecraft.network.play.server.S2EPacketCloseWindow", "gb", Context.CLIENT);
  54 + public static Packets S2DPacketOpenWindow = new Packets("net.minecraft.network.play.server.S2DPacketOpenWindow", "gc", Context.CLIENT);
  55 + public static Packets S30PacketWindowItems = new Packets("net.minecraft.network.play.server.S30PacketWindowItems", "gd", Context.CLIENT);
  56 + public static Packets S31PacketWindowProperty = new Packets("net.minecraft.network.play.server.S31PacketWindowProperty", "ge", Context.CLIENT);
  57 + public static Packets S2FPacketSetSlot = new Packets("net.minecraft.network.play.server.S2FPacketSetSlot", "gf", Context.CLIENT);
  58 + public static Packets S3FPacketCustomPayload = new Packets("net.minecraft.network.play.server.S3FPacketCustomPayload", "gg", Context.CLIENT);
  59 + public static Packets S40PacketDisconnect = new Packets("net.minecraft.network.play.server.S40PacketDisconnect", "gh", Context.CLIENT);
  60 + public static Packets S19PacketEntityStatus = new Packets("net.minecraft.network.play.server.S19PacketEntityStatus", "gi", Context.CLIENT);
  61 + public static Packets S49PacketUpdateEntityNBT = new Packets("net.minecraft.network.play.server.S49PacketUpdateEntityNBT", "gj", Context.CLIENT);
  62 + public static Packets S27PacketExplosion = new Packets("net.minecraft.network.play.server.S27PacketExplosion", "gk", Context.CLIENT);
  63 + public static Packets S46PacketSetCompressionLevel = new Packets("net.minecraft.network.play.server.S46PacketSetCompressionLevel", "gl", Context.CLIENT);
  64 + public static Packets S2BPacketChangeGameState = new Packets("net.minecraft.network.play.server.S2BPacketChangeGameState", "gm", Context.CLIENT);
  65 + public static Packets S00PacketKeepAlive = new Packets("net.minecraft.network.play.server.S00PacketKeepAlive", "gn", Context.CLIENT);
  66 + public static Packets S21PacketChunkData = new Packets("net.minecraft.network.play.server.S21PacketChunkData", "go", Context.CLIENT);
  67 + public static Packets S26PacketMapChunkBulk = new Packets("net.minecraft.network.play.server.S26PacketMapChunkBulk", "gp", Context.CLIENT);
  68 + public static Packets S28PacketEffect = new Packets("net.minecraft.network.play.server.S28PacketEffect", "gq", Context.CLIENT);
  69 + public static Packets S2APacketParticles = new Packets("net.minecraft.network.play.server.S2APacketParticles", "gr", Context.CLIENT);
  70 + public static Packets S29PacketSoundEffect = new Packets("net.minecraft.network.play.server.S29PacketSoundEffect", "gs", Context.CLIENT);
  71 + public static Packets S01PacketJoinGame = new Packets("net.minecraft.network.play.server.S01PacketJoinGame", "gt", Context.CLIENT);
  72 + public static Packets S34PacketMaps = new Packets("net.minecraft.network.play.server.S34PacketMaps", "gu", Context.CLIENT);
  73 + public static Packets S14PacketEntity = new Packets("net.minecraft.network.play.server.S14PacketEntity", "gv", Context.CLIENT);
  74 + public static Packets S15PacketEntityRelMove = new Packets("net.minecraft.network.play.server.S14PacketEntity$S15PacketEntityRelMove", "gv$a", Context.CLIENT);
  75 + public static Packets S17PacketEntityLookMove = new Packets("net.minecraft.network.play.server.S14PacketEntity$S17PacketEntityLookMove", "gv$b", Context.CLIENT);
  76 + public static Packets S16PacketEntityLook = new Packets("net.minecraft.network.play.server.S14PacketEntity$S16PacketEntityLook", "gv$c", Context.CLIENT);
  77 + public static Packets S36PacketSignEditorOpen = new Packets("net.minecraft.network.play.server.S36PacketSignEditorOpen", "gw", Context.CLIENT);
  78 + public static Packets S39PacketPlayerAbilities = new Packets("net.minecraft.network.play.server.S39PacketPlayerAbilities", "gx", Context.CLIENT);
  79 + public static Packets S42PacketCombatEvent = new Packets("net.minecraft.network.play.server.S42PacketCombatEvent", "gy", Context.CLIENT);
  80 + public static Packets S38PacketPlayerListItem = new Packets("net.minecraft.network.play.server.S38PacketPlayerListItem", "gz", Context.CLIENT);
  81 + public static Packets S0APacketUseBed = new Packets("net.minecraft.network.play.server.S0APacketUseBed", "ha", Context.CLIENT);
  82 + public static Packets S13PacketDestroyEntities = new Packets("net.minecraft.network.play.server.S13PacketDestroyEntities", "hb", Context.CLIENT);
  83 + public static Packets S1EPacketRemoveEntityEffect = new Packets("net.minecraft.network.play.server.S1EPacketRemoveEntityEffect", "hc", Context.CLIENT);
  84 + public static Packets S48PacketResourcePackSend = new Packets("net.minecraft.network.play.server.S48PacketResourcePackSend", "hd", Context.CLIENT);
  85 + public static Packets S07PacketRespawn = new Packets("net.minecraft.network.play.server.S07PacketRespawn", "he", Context.CLIENT);
  86 + public static Packets S19PacketEntityHeadLook = new Packets("net.minecraft.network.play.server.S19PacketEntityHeadLook", "hf", Context.CLIENT);
  87 + public static Packets S44PacketWorldBorder = new Packets("net.minecraft.network.play.server.S44PacketWorldBorder", "hg", Context.CLIENT);
  88 + public static Packets S43PacketCamera = new Packets("net.minecraft.network.play.server.S43PacketCamera", "hh", Context.CLIENT);
  89 + public static Packets S09PacketHeldItemChange = new Packets("net.minecraft.network.play.server.S09PacketHeldItemChange", "hi", Context.CLIENT);
  90 + public static Packets S3DPacketDisplayScoreboard = new Packets("net.minecraft.network.play.server.S3DPacketDisplayScoreboard", "hj", Context.CLIENT);
  91 + public static Packets S1CPacketEntityMetadata = new Packets("net.minecraft.network.play.server.S1CPacketEntityMetadata", "hk", Context.CLIENT);
  92 + public static Packets S1BPacketEntityAttach = new Packets("net.minecraft.network.play.server.S1BPacketEntityAttach", "hl", Context.CLIENT);
  93 + public static Packets S12PacketEntityVelocity = new Packets("net.minecraft.network.play.server.S12PacketEntityVelocity", "hm", Context.CLIENT);
  94 + public static Packets S04PacketEntityEquipment = new Packets("net.minecraft.network.play.server.S04PacketEntityEquipment", "hn", Context.CLIENT);
  95 + public static Packets S1FPacketSetExperience = new Packets("net.minecraft.network.play.server.S1FPacketSetExperience", "ho", Context.CLIENT);
  96 + public static Packets S06PacketUpdateHealth = new Packets("net.minecraft.network.play.server.S06PacketUpdateHealth", "hp", Context.CLIENT);
  97 + public static Packets S3BPacketScoreboardObjective = new Packets("net.minecraft.network.play.server.S3BPacketScoreboardObjective", "hq", Context.CLIENT);
  98 + public static Packets S3EPacketTeams = new Packets("net.minecraft.network.play.server.S3EPacketTeams", "hr", Context.CLIENT);
  99 + public static Packets S3CPacketUpdateScore = new Packets("net.minecraft.network.play.server.S3CPacketUpdateScore", "hs", Context.CLIENT);
  100 + public static Packets S05PacketSpawnPosition = new Packets("net.minecraft.network.play.server.S05PacketSpawnPosition", "ht", Context.CLIENT);
  101 + public static Packets S03PacketTimeUpdate = new Packets("net.minecraft.network.play.server.S03PacketTimeUpdate", "hu", Context.CLIENT);
  102 + public static Packets S45PacketTitle = new Packets("net.minecraft.network.play.server.S45PacketTitle", "hv", Context.CLIENT);
  103 + public static Packets S33PacketUpdateSign = new Packets("net.minecraft.network.play.server.S33PacketUpdateSign", "hw", Context.CLIENT);
  104 + public static Packets S47PacketPlayerListHeaderFooter = new Packets("net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter", "hx", Context.CLIENT);
  105 + public static Packets S0DPacketCollectItem = new Packets("net.minecraft.network.play.server.S0DPacketCollectItem", "hy", Context.CLIENT);
  106 + public static Packets S18PacketEntityTeleport = new Packets("net.minecraft.network.play.server.S18PacketEntityTeleport", "hz", Context.CLIENT);
  107 + public static Packets S20PacketEntityProperties = new Packets("net.minecraft.network.play.server.S20PacketEntityProperties", "ia", Context.CLIENT);
  108 + public static Packets S1DPacketEntityEffect = new Packets("net.minecraft.network.play.server.S1DPacketEntityEffect", "ib", Context.CLIENT);
  109 + public static Packets C14PacketTabComplete = new Packets("net.minecraft.network.play.client.C14PacketTabComplete", "id", Context.SERVER);
  110 + public static Packets C01PacketChatMessage = new Packets("net.minecraft.network.play.client.C01PacketChatMessage", "ie", Context.SERVER);
  111 + public static Packets C16PacketClientStatus = new Packets("net.minecraft.network.play.client.C16PacketClientStatus", "ig", Context.SERVER);
  112 + public static Packets C15PacketClientSettings = new Packets("net.minecraft.network.play.client.C15PacketClientSettings", "ih", Context.SERVER);
  113 + public static Packets C0FPacketConfirmTransaction = new Packets("net.minecraft.network.play.client.C0FPacketConfirmTransaction", "ii", Context.SERVER);
  114 + public static Packets C11PacketEnchantItem = new Packets("net.minecraft.network.play.client.C11PacketEnchantItem", "ij", Context.SERVER);
  115 + public static Packets C0EPacketClickWindow = new Packets("net.minecraft.network.play.client.C0EPacketClickWindow", "ik", Context.SERVER);
  116 + public static Packets C0DPacketCloseWindow = new Packets("net.minecraft.network.play.client.C0DPacketCloseWindow", "il", Context.SERVER);
  117 + public static Packets C17PacketCustomPayload = new Packets("net.minecraft.network.play.client.C17PacketCustomPayload", "im", Context.SERVER);
  118 + public static Packets C02PacketUseEntity = new Packets("net.minecraft.network.play.client.C02PacketUseEntity", "in", Context.SERVER);
  119 + public static Packets C00PacketKeepAlive = new Packets("net.minecraft.network.play.client.C00PacketKeepAlive", "io", Context.SERVER);
  120 + public static Packets C03PacketPlayer = new Packets("net.minecraft.network.play.client.C03PacketPlayer", "ip", Context.SERVER);
  121 + public static Packets C04PacketPlayerPosition = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition", "ip$a", Context.SERVER);
  122 + public static Packets C06PacketPlayerPosLook = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook", "ip$b", Context.SERVER);
  123 + public static Packets C05PacketPlayerLook = new Packets("net.minecraft.network.play.client.C03PacketPlayer$C05PacketPlayerLook", "ip$c", Context.SERVER);
  124 + public static Packets C13PacketPlayerAbilities = new Packets("net.minecraft.network.play.client.C13PacketPlayerAbilities", "iq", Context.SERVER);
  125 + public static Packets C07PacketPlayerDigging = new Packets("net.minecraft.network.play.client.C07PacketPlayerDigging", "ir", Context.SERVER);
  126 + public static Packets C0BPacketEntityAction = new Packets("net.minecraft.network.play.client.C0BPacketEntityAction", "is", Context.SERVER);
  127 + public static Packets C0CPacketInput = new Packets("net.minecraft.network.play.client.C0CPacketInput", "it", Context.SERVER);
  128 + public static Packets C19PacketResourcePackStatus = new Packets("net.minecraft.network.play.client.C19PacketResourcePackStatus", "iu", Context.SERVER);
  129 + public static Packets C09PacketHeldItemChange = new Packets("net.minecraft.network.play.client.C09PacketHeldItemChange", "iv", Context.SERVER);
  130 + public static Packets C10PacketCreativeInventoryAction = new Packets("net.minecraft.network.play.client.C10PacketCreativeInventoryAction", "iw", Context.SERVER);
  131 + public static Packets C12PacketUpdateSign = new Packets("net.minecraft.network.play.client.C12PacketUpdateSign", "ix", Context.SERVER);
  132 + public static Packets C0APacketAnimation = new Packets("net.minecraft.network.play.client.C0APacketAnimation", "iy", Context.SERVER);
  133 + public static Packets C18PacketSpectate = new Packets("net.minecraft.network.play.client.C18PacketSpectate", "iz", Context.SERVER);
  134 + public static Packets C08PacketPlayerBlockPlacement = new Packets("net.minecraft.network.play.client.C08PacketPlayerBlockPlacement", "ja", Context.SERVER);
  135 + public static Packets C00Handshake = new Packets("net.minecraft.network.handshake.client.C00Handshake", "jc", Context.SERVER);
  136 + public static Packets S02PacketLoginSuccess = new Packets("net.minecraft.network.login.server.S02PacketLoginSuccess", "jg", Context.CLIENT);
  137 + public static Packets S01PacketEncryptionRequest = new Packets("net.minecraft.network.login.server.S01PacketEncryptionRequest", "jh", Context.CLIENT);
  138 + public static Packets S03PacketEnableCompression = new Packets("net.minecraft.network.login.server.S03PacketEnableCompression", "ji", Context.CLIENT);
  139 + public static Packets S00PacketDisconnect = new Packets("net.minecraft.network.login.server.S00PacketDisconnect", "jj", Context.CLIENT);
  140 + public static Packets C00PacketLoginStart = new Packets("net.minecraft.network.login.client.C00PacketLoginStart", "jl", Context.SERVER);
  141 + public static Packets C01PacketEncryptionResponse = new Packets("net.minecraft.network.login.client.C01PacketEncryptionResponse", "jm", Context.SERVER);
  142 + public static Packets S01PacketPong = new Packets("net.minecraft.network.status.server.S01PacketPong", "jq", Context.CLIENT);
  143 + public static Packets S00PacketServerInfo = new Packets("net.minecraft.network.status.server.S00PacketServerInfo", "jr", Context.CLIENT);
  144 + public static Packets C01PacketPing = new Packets("net.minecraft.network.status.client.C01PacketPing", "ju", Context.SERVER);
  145 + public static Packets C00PacketServerQuery = new Packets("net.minecraft.network.status.client.C00PacketServerQuery", "jv", Context.SERVER);
146 146  
147 147 // CHECKSTYLE:ON
148 148  
... ...
src/main/java/com/mumfrey/liteloader/core/runtime/SrgContainer.java 0 โ†’ 100644
  1 +package com.mumfrey.liteloader.core.runtime;
  2 +
  3 +import java.io.File;
  4 +import java.io.IOException;
  5 +import java.nio.charset.Charset;
  6 +import java.util.HashMap;
  7 +import java.util.Map;
  8 +import java.util.Map.Entry;
  9 +
  10 +import org.spongepowered.asm.obfuscation.SrgField;
  11 +import org.spongepowered.asm.obfuscation.SrgMethod;
  12 +
  13 +import com.google.common.io.Files;
  14 +
  15 +import joptsimple.internal.Strings;
  16 +
  17 +public class SrgContainer
  18 +{
  19 +
  20 + private final Map<String, String> packageMap = new HashMap<String, String>();
  21 + private final Map<String, String> classMap = new HashMap<String, String>();
  22 + private final Map<SrgField, SrgField> fieldMap = new HashMap<SrgField, SrgField>();
  23 + private final Map<SrgMethod, SrgMethod> methodMap = new HashMap<SrgMethod, SrgMethod>();
  24 +
  25 + private final Map<String, String> reversePackageMap = new HashMap<String, String>();
  26 + private final Map<String, String> reverseClassMap = new HashMap<String, String>();
  27 + private final Map<SrgField, SrgField> reverseFieldMap = new HashMap<SrgField, SrgField>();
  28 + private final Map<SrgMethod, SrgMethod> reverseMethodMap = new HashMap<SrgMethod, SrgMethod>();
  29 +
  30 + public void readSrg(File srg) throws IOException
  31 + {
  32 + for (String line : Files.readLines(srg, Charset.defaultCharset()))
  33 + {
  34 + if (Strings.isNullOrEmpty(line) || line.startsWith("#"))
  35 + {
  36 + continue;
  37 + }
  38 +
  39 + String type = line.substring(0, 2);
  40 + String[] args = line.substring(4).split(" ");
  41 +
  42 + if ("PK".equals(type))
  43 + {
  44 + this.packageMap.put(args[0], args[1]);
  45 + this.reversePackageMap.put(args[1], args[0]);
  46 + }
  47 + else if ("CL".equals(type))
  48 + {
  49 + this.classMap.put(args[0], args[1]);
  50 + this.reverseClassMap.put(args[1], args[0]);
  51 + }
  52 + else if ("FD".equals(type))
  53 + {
  54 + SrgField field1 = new SrgField(args[0]);
  55 + SrgField field2 = new SrgField(args[1]);
  56 + this.fieldMap.put(field1, field2);
  57 + this.reverseFieldMap.put(field2, field1);
  58 + }
  59 + else if ("MD".equals(type))
  60 + {
  61 + SrgMethod method1 = new SrgMethod(args[0], args[1]);
  62 + SrgMethod method2 = new SrgMethod(args[2], args[3]);
  63 + this.methodMap.put(method1, method2);
  64 + this.reverseMethodMap.put(method2, method1);
  65 + }
  66 + }
  67 + }
  68 +
  69 + public SrgMethod getMethodMapping(String owner, String name, boolean reverse)
  70 + {
  71 + Map<SrgMethod, SrgMethod> map = reverse ? this.reverseMethodMap : this.methodMap;
  72 +
  73 + for (Entry<SrgMethod, SrgMethod> mapping : map.entrySet())
  74 + {
  75 + SrgMethod method = mapping.getKey();
  76 + if (owner.equals(method.getOwner()) && name.equals(method.getSimpleName()))
  77 + {
  78 + return mapping.getValue();
  79 + }
  80 + }
  81 +
  82 + return null;
  83 + }
  84 +
  85 + public SrgField getFieldMapping(String owner, String name, boolean reverse)
  86 + {
  87 + Map<SrgField, SrgField> map = reverse ? this.reverseFieldMap : this.fieldMap;
  88 +
  89 + for (Entry<SrgField, SrgField> mapping : map.entrySet())
  90 + {
  91 + SrgField field = mapping.getKey();
  92 + if (owner.equals(field.getOwner()) && name.equals(field.getName()))
  93 + {
  94 + return mapping.getValue();
  95 + }
  96 + }
  97 +
  98 + return null;
  99 + }
  100 +
  101 + public SrgMethod getMethodMapping(SrgMethod methodName)
  102 + {
  103 + return this.methodMap.get(methodName);
  104 + }
  105 +
  106 + public SrgField getFieldMapping(SrgField fieldName)
  107 + {
  108 + return this.fieldMap.get(fieldName);
  109 + }
  110 +
  111 + public String getClassMapping(String className)
  112 + {
  113 + return this.classMap.get(className);
  114 + }
  115 +
  116 + public String getPackageMapping(String packageName)
  117 + {
  118 + return this.packageMap.get(packageName);
  119 + }
  120 +
  121 +}
... ...
src/main/java/com/mumfrey/liteloader/launch/LiteLoaderTweaker.java
... ... @@ -33,8 +33,8 @@ public class LiteLoaderTweaker implements ITweaker
33 33 public static final int ENV_TYPE_CLIENT = 0;
34 34 public static final int ENV_TYPE_DEDICATEDSERVER = 1;
35 35  
36   - // TODO Version - 1.8
37   - public static final String VERSION = "1.8";
  36 + // TODO Version - 1.8.9
  37 + public static final String VERSION = "1.8.9";
38 38  
39 39 protected static final String bootstrapClassName = "com.mumfrey.liteloader.core.LiteLoaderBootstrap";
40 40  
... ...
src/main/java/com/mumfrey/liteloader/transformers/PacketHandlerException.java
... ... @@ -12,18 +12,18 @@ public class PacketHandlerException extends RuntimeException
12 12 {
13 13 private static final long serialVersionUID = -330946238844640302L;
14 14  
15   - private Packet packet;
  15 + private Packet<?> packet;
16 16  
17   - public PacketHandlerException(Packet packet)
  17 + public PacketHandlerException(Packet<?> packet)
18 18 {
19 19 }
20 20  
21   - public PacketHandlerException(Packet packet, String message)
  21 + public PacketHandlerException(Packet<?> packet, String message)
22 22 {
23 23 super(message);
24 24 }
25 25  
26   - public Packet getPacket()
  26 + public Packet<?> getPacket()
27 27 {
28 28 return this.packet;
29 29 }
... ...
src/main/java/com/mumfrey/liteloader/transformers/access/AccessorException.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.transformers.access;
  7 +
  8 +public class AccessorException extends RuntimeException
  9 +{
  10 + private static final long serialVersionUID = 1L;
  11 +
  12 + public AccessorException(String message)
  13 + {
  14 + super(message);
  15 + }
  16 +
  17 +}
... ...
src/main/java/com/mumfrey/liteloader/transformers/access/AccessorTransformer.java
... ... @@ -37,6 +37,8 @@ import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
37 37 */
38 38 public abstract class AccessorTransformer extends ClassTransformer
39 39 {
  40 + static final String EXCEPTION = "com/mumfrey/liteloader/transformers/access/AccessorException";
  41 +
40 42 static final Pattern ordinalRefPattern = Pattern.compile("^#([0-9]{1,5})$");
41 43  
42 44 /**
... ... @@ -269,13 +271,14 @@ public abstract class AccessorTransformer extends ClassTransformer
269 271 {
270 272 LiteLoaderLogger.severe("[AccessorTransformer] Method %s for %s has no @Accessor or @Invoker annotation, the method will "
271 273 + "be ABSTRACT!", method.name, this.iface);
272   - this.injectException(classNode, method, "No @Accessor or @Invoker annotation on method");
  274 + this.injectException(classNode, method, AccessorTransformer.EXCEPTION, "No @Accessor or @Invoker annotation on method");
273 275 return;
274 276 }
275 277  
276 278 LiteLoaderLogger.severe("[AccessorTransformer] Method %s for %s could not locate target member, the method will be ABSTRACT!",
277 279 method.name, this.iface);
278   - this.injectException(classNode, method, "Could not locate target class member '" + targetId + "'");
  280 + this.injectException(classNode, method, AccessorTransformer.EXCEPTION,
  281 + "Accessor could not locate target class member '" + targetId + "'");
279 282 }
280 283  
281 284 /**
... ... @@ -437,18 +440,19 @@ public abstract class AccessorTransformer extends ClassTransformer
437 440 *
438 441 * @param classNode
439 442 * @param method
  443 + * @param exceptionType
440 444 * @param message
441 445 */
442   - private void injectException(ClassNode classNode, MethodNode method, String message)
  446 + private void injectException(ClassNode classNode, MethodNode method, String exceptionType, String message)
443 447 {
444 448 InsnList insns = method.instructions;
445 449 method.maxStack = 2;
446 450  
447 451 insns.clear();
448   - insns.add(new TypeInsnNode(Opcodes.NEW, "java/lang/RuntimeException"));
  452 + insns.add(new TypeInsnNode(Opcodes.NEW, exceptionType));
449 453 insns.add(new InsnNode(Opcodes.DUP));
450 454 insns.add(new LdcInsnNode(message));
451   - insns.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "java/lang/RuntimeException", "<init>", "(Ljava/lang/String;)V", false));
  455 + insns.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, exceptionType, "<init>", "(Ljava/lang/String;)V", false));
452 456 insns.add(new InsnNode(Opcodes.ATHROW));
453 457 }
454 458  
... ...
src/main/java/com/mumfrey/liteloader/transformers/event/json/JsonMethods.java
... ... @@ -4,7 +4,6 @@ import java.util.HashMap;
4 4 import java.util.List;
5 5 import java.util.Map;
6 6  
7   -import com.mumfrey.liteloader.core.runtime.Methods;
8 7 import com.mumfrey.liteloader.transformers.event.MethodInfo;
9 8  
10 9 /**
... ... @@ -76,12 +75,6 @@ public class JsonMethods
76 75 return method;
77 76 }
78 77  
79   - MethodInfo builtinMethod = Methods.getByName(key);
80   - if (builtinMethod != null)
81   - {
82   - return builtinMethod;
83   - }
84   -
85 78 throw new InvalidEventJsonException("Could not locate method descriptor with token " + token);
86 79 }
87 80 }
88 81 \ No newline at end of file
... ...
src/main/java/com/mumfrey/liteloader/util/ChatUtilities.java
... ... @@ -82,7 +82,6 @@ public abstract class ChatUtilities
82 82 return siblings;
83 83 }
84 84  
85   - @SuppressWarnings("unchecked")
86 85 private static IChatComponent covertCodesInPlace(IChatComponent component)
87 86 {
88 87 IChatComponent newComponent = null;
... ...
src/main/resources/mixins.liteloader.core.json
1 1 {
2 2 "required": true,
3   - "minVersion": "0.4.10",
  3 + "minVersion": "0.5.3",
4 4 "package": "com.mumfrey.liteloader.common.mixin",
5 5 "refmap": "mixins.liteloader.core.refmap.json",
6 6 "mixins": [
... ... @@ -10,5 +10,8 @@
10 10 "MixinItemInWorldManager",
11 11 "MixinC15PacketClientSettings",
12 12 "MixinS02PacketChat"
13   - ]
  13 + ],
  14 + "injectors": {
  15 + "defaultRequire": 1
  16 + }
14 17 }
15 18 \ No newline at end of file
... ...