use of dev.hypnotic.event.events.EventRender3D in project Hypnotic-Client by Hypnotic-Development.
the class GameRendererMixin method onRenderWorld.
@Inject(method = "renderWorld", at = @At(value = "INVOKE_STRING", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", args = { "ldc=hand" }), locals = LocalCapture.CAPTURE_FAILSOFT)
private void onRenderWorld(float tickDelta, long limitTime, MatrixStack matrices, CallbackInfo info) {
MinecraftClient mc = MinecraftClient.getInstance();
if (mc == null || mc.world == null || mc.player == null)
return;
mc.getProfiler().push("hypnotic-client_render");
EventRender3D event = new EventRender3D(matrices, tickDelta, mc.getCameraEntity().getPos().x, mc.getCameraEntity().getPos().y, mc.getCameraEntity().getPos().z);
event.call();
RenderSystem.applyModelViewMatrix();
mc.getProfiler().pop();
}
Aggregations