Search in sources :

Example 1 with Renderer3D

use of meteordevelopment.meteorclient.renderer.Renderer3D in project meteor-client by MeteorDevelopment.

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_FAILEXCEPTION)
private void onRenderWorld(float tickDelta, long limitTime, MatrixStack matrices, CallbackInfo info, boolean bl, Camera camera, MatrixStack matrixStack, double d, float f, Matrix4f matrix4f) {
    if (!Utils.canUpdate())
        return;
    client.getProfiler().push("meteor-client_render");
    if (renderer == null)
        renderer = new Renderer3D();
    Render3DEvent event = Render3DEvent.get(matrices, renderer, tickDelta, camera.getPos().x, camera.getPos().y, camera.getPos().z);
    RenderUtils.updateScreenCenter();
    NametagUtils.onRender(matrices, matrix4f);
    renderer.begin();
    MeteorClient.EVENT_BUS.post(event);
    renderer.render(matrices);
    RenderSystem.applyModelViewMatrix();
    client.getProfiler().pop();
}
Also used : Render3DEvent(meteordevelopment.meteorclient.events.render.Render3DEvent) Renderer3D(meteordevelopment.meteorclient.renderer.Renderer3D)

Aggregations

Render3DEvent (meteordevelopment.meteorclient.events.render.Render3DEvent)1 Renderer3D (meteordevelopment.meteorclient.renderer.Renderer3D)1