use of meteordevelopment.meteorclient.events.render.Render3DEvent in project meteor-client by MeteorDevelopment.
the class Nuker method onRender.
@EventHandler
private void onRender(Render3DEvent event) {
if (enableRenderBreaking.get()) {
// Broken block
renderBlocks.sort(Comparator.comparingInt(o -> -o.ticks));
renderBlocks.forEach(renderBlock -> renderBlock.render(event, sideColor.get(), lineColor.get(), shapeModeBreak.get()));
}
if (enableRenderBounding.get()) {
// Render bounding box if cube and should break stuff
if (shape.get() != Shape.Sphere && mode.get() != Mode.Smash) {
box = new Box(pos1, pos2);
event.renderer.box(box, sideColorBox.get(), lineColorBox.get(), shapeModeBox.get(), 0);
}
}
}
use of meteordevelopment.meteorclient.events.render.Render3DEvent 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();
}
Aggregations