Search in sources :

Example 1 with Render3DEvent

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);
        }
    }
}
Also used : BlockIterator(meteordevelopment.meteorclient.utils.world.BlockIterator) BlockUtils(meteordevelopment.meteorclient.utils.world.BlockUtils) Color(meteordevelopment.meteorclient.utils.render.color.Color) ShapeMode(meteordevelopment.meteorclient.renderer.ShapeMode) meteordevelopment.meteorclient.settings(meteordevelopment.meteorclient.settings) Box(net.minecraft.util.math.Box) Categories(meteordevelopment.meteorclient.systems.modules.Categories) BlockPos(net.minecraft.util.math.BlockPos) SettingColor(meteordevelopment.meteorclient.utils.render.color.SettingColor) TickEvent(meteordevelopment.meteorclient.events.world.TickEvent) ArrayList(java.util.ArrayList) List(java.util.List) Module(meteordevelopment.meteorclient.systems.modules.Module) Block(net.minecraft.block.Block) Vec3d(net.minecraft.util.math.Vec3d) Pool(meteordevelopment.meteorclient.utils.misc.Pool) Comparator(java.util.Comparator) EventHandler(meteordevelopment.orbit.EventHandler) Render3DEvent(meteordevelopment.meteorclient.events.render.Render3DEvent) Utils(meteordevelopment.meteorclient.utils.Utils) Box(net.minecraft.util.math.Box) EventHandler(meteordevelopment.orbit.EventHandler)

Example 2 with Render3DEvent

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();
}
Also used : Render3DEvent(meteordevelopment.meteorclient.events.render.Render3DEvent) Renderer3D(meteordevelopment.meteorclient.renderer.Renderer3D)

Aggregations

Render3DEvent (meteordevelopment.meteorclient.events.render.Render3DEvent)2 ArrayList (java.util.ArrayList)1 Comparator (java.util.Comparator)1 List (java.util.List)1 TickEvent (meteordevelopment.meteorclient.events.world.TickEvent)1 Renderer3D (meteordevelopment.meteorclient.renderer.Renderer3D)1 ShapeMode (meteordevelopment.meteorclient.renderer.ShapeMode)1 meteordevelopment.meteorclient.settings (meteordevelopment.meteorclient.settings)1 Categories (meteordevelopment.meteorclient.systems.modules.Categories)1 Module (meteordevelopment.meteorclient.systems.modules.Module)1 Utils (meteordevelopment.meteorclient.utils.Utils)1 Pool (meteordevelopment.meteorclient.utils.misc.Pool)1 Color (meteordevelopment.meteorclient.utils.render.color.Color)1 SettingColor (meteordevelopment.meteorclient.utils.render.color.SettingColor)1 BlockIterator (meteordevelopment.meteorclient.utils.world.BlockIterator)1 BlockUtils (meteordevelopment.meteorclient.utils.world.BlockUtils)1 EventHandler (meteordevelopment.orbit.EventHandler)1 Block (net.minecraft.block.Block)1 BlockPos (net.minecraft.util.math.BlockPos)1 Box (net.minecraft.util.math.Box)1