MixinEntityRenderer.java
4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package com.mumfrey.liteloader.client.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.At.Shift;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.mumfrey.liteloader.client.ClientProxy;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderGlobal;
@Mixin(EntityRenderer.class)
public abstract class MixinEntityRenderer
{
@Inject(method = "updateCameraAndRender(F)V", at = @At(
value = "INVOKE",
shift = Shift.AFTER,
target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V"
))
private void onPreRenderGUI(float partialTicks, CallbackInfo ci)
{
ClientProxy.preRenderGUI(partialTicks);
}
@Inject(method = "updateCameraAndRender(F)V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
))
private void onRenderHUD(float partialTicks, CallbackInfo ci)
{
ClientProxy.onRenderHUD(partialTicks);
}
@Inject(method = "updateCameraAndRender(F)V", at = @At(
value = "INVOKE",
shift = Shift.AFTER,
target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V"
))
private void onPostRenderHUD(float partialTicks, CallbackInfo ci)
{
ClientProxy.postRenderHUD(partialTicks);
}
@Inject(method = "renderWorld(FJ)V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/profiler/Profiler;startSection(Ljava/lang/String;)V",
ordinal = 0
))
private void onRenderWorld(float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.onRenderWorld(partialTicks, timeSlice);
}
@Inject(method = "renderWorld(FJ)V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/profiler/Profiler;endSection()V",
ordinal = 0
))
private void onPostRender(float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.postRender(partialTicks, timeSlice);
}
@Inject(method = "renderWorldPass(IFJ)V", at = @At(
value = "INVOKE_STRING",
target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V",
args = "ldc=frustum"
))
private void onSetupCameraTransform(int pass, float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.onSetupCameraTransform(pass, partialTicks, timeSlice);
}
@Inject(method = "renderWorldPass(IFJ)V", at = @At(
value = "INVOKE_STRING",
target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V",
args = "ldc=sky"
))
private void onRenderSky(int pass, float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.onRenderSky(pass, partialTicks, timeSlice);
}
@Inject(method = "renderWorldPass(IFJ)V", at = @At(
value = "INVOKE_STRING",
target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V",
args = "ldc=terrain"
))
private void onRenderTerrain(int pass, float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.onRenderTerrain(pass, partialTicks, timeSlice);
}
@Inject(method = "renderWorldPass(IFJ)V", at = @At(
value = "INVOKE_STRING",
target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V",
args = "ldc=litParticles"
))
private void onPostRenderEntities(int pass, float partialTicks, long timeSlice, CallbackInfo ci)
{
ClientProxy.postRenderEntities(pass, partialTicks, timeSlice);
}
@Inject(method = "renderCloudsCheck(Lnet/minecraft/client/renderer/RenderGlobal;FI)V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V"
))
private void onRenderClouds(RenderGlobal renderGlobalIn, float partialTicks, int pass, CallbackInfo ci)
{
ClientProxy.onRenderClouds(renderGlobalIn, partialTicks, pass);
}
}