Search in sources :

Example 1 with Color

use of meteordevelopment.meteorclient.utils.render.color.Color in project meteor-rejects by AntiCope.

the class Confuse method onRender.

@EventHandler
private void onRender(Render3DEvent event) {
    if (target == null)
        return;
    boolean flag = budgetGraphics.get();
    Vec3d last = null;
    addition += flag ? 0 : 1.0;
    if (addition > 360)
        addition = 0;
    for (int i = 0; i < 360; i += flag ? 7 : 1) {
        Color c1;
        if (flag)
            c1 = circleColor.get();
        else {
            double rot = (255.0 * 3) * (((((double) i) + addition) % 360) / 360.0);
            int seed = (int) Math.floor(rot / 255.0);
            double current = rot % 255;
            double red = seed == 0 ? current : (seed == 1 ? Math.abs(current - 255) : 0);
            double green = seed == 1 ? current : (seed == 2 ? Math.abs(current - 255) : 0);
            double blue = seed == 2 ? current : (seed == 0 ? Math.abs(current - 255) : 0);
            c1 = new Color((int) red, (int) green, (int) blue);
        }
        Vec3d tp = target.getPos();
        double rad = Math.toRadians(i);
        double sin = Math.sin(rad) * 3;
        double cos = Math.cos(rad) * 3;
        Vec3d c = new Vec3d(tp.x + sin, tp.y + target.getHeight() / 2, tp.z + cos);
        if (last != null)
            event.renderer.line(last.x, last.y, last.z, c.x, c.y, c.z, c1);
        last = c;
    }
}
Also used : Color(meteordevelopment.meteorclient.utils.render.color.Color) SettingColor(meteordevelopment.meteorclient.utils.render.color.SettingColor) Vec3d(net.minecraft.util.math.Vec3d) EventHandler(meteordevelopment.orbit.EventHandler)

Example 2 with Color

use of meteordevelopment.meteorclient.utils.render.color.Color in project meteor-rejects by AntiCope.

the class WMeteorVerticalSeparator method onRender.

@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
    MeteorRoundedGuiTheme theme = theme();
    Color colorEdges = theme.separatorEdges.get();
    Color colorCenter = theme.separatorCenter.get();
    double s = theme.scale(1);
    double offsetX = Math.round(width / 2.0);
    renderer.quad(x + offsetX, y, s, height / 2, colorEdges, colorEdges, colorCenter, colorCenter);
    renderer.quad(x + offsetX, y + height / 2, s, height / 2, colorCenter, colorCenter, colorEdges, colorEdges);
}
Also used : MeteorRoundedGuiTheme(anticope.rejects.gui.themes.rounded.MeteorRoundedGuiTheme) Color(meteordevelopment.meteorclient.utils.render.color.Color)

Example 3 with Color

use of meteordevelopment.meteorclient.utils.render.color.Color in project meteor-client by MeteorDevelopment.

the class EndCrystalEntityRendererMixin method modifyFrame1.

// Frame
@Redirect(method = "render(Lnet/minecraft/entity/decoration/EndCrystalEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelPart;render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;II)V", ordinal = 1))
private void modifyFrame1(ModelPart modelPart, MatrixStack matrices, VertexConsumer vertices, int light, int overlay) {
    Chams module = Modules.get().get(Chams.class);
    if (!module.isActive() || !module.crystals.get()) {
        frame.render(matrices, vertices, light, overlay);
        return;
    }
    if (module.renderFrame1.get()) {
        Color color = module.crystalsFrame1Color.get();
        frame.render(matrices, vertices, light, overlay, color.r / 255f, color.g / 255f, color.b / 255f, color.a / 255f);
    }
}
Also used : Chams(meteordevelopment.meteorclient.systems.modules.render.Chams) Color(meteordevelopment.meteorclient.utils.render.color.Color) Redirect(org.spongepowered.asm.mixin.injection.Redirect)

Example 4 with Color

use of meteordevelopment.meteorclient.utils.render.color.Color in project meteor-client by MeteorDevelopment.

the class EndCrystalEntityRendererMixin method modifyCore.

// Core
@Redirect(method = "render(Lnet/minecraft/entity/decoration/EndCrystalEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelPart;render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;II)V", ordinal = 3))
private void modifyCore(ModelPart modelPart, MatrixStack matrices, VertexConsumer vertices, int light, int overlay) {
    Chams module = Modules.get().get(Chams.class);
    if (!module.isActive() || !module.crystals.get()) {
        core.render(matrices, vertices, light, overlay);
        return;
    }
    if (module.renderCore.get()) {
        Color color = module.crystalsCoreColor.get();
        core.render(matrices, vertices, light, overlay, color.r / 255f, color.g / 255f, color.b / 255f, color.a / 255f);
    }
}
Also used : Chams(meteordevelopment.meteorclient.systems.modules.render.Chams) Color(meteordevelopment.meteorclient.utils.render.color.Color) Redirect(org.spongepowered.asm.mixin.injection.Redirect)

Example 5 with Color

use of meteordevelopment.meteorclient.utils.render.color.Color in project meteor-client by MeteorDevelopment.

the class PlayerEntityRendererMixin method redirectRenderMain.

@Redirect(method = "renderArm", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelPart;render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;II)V", ordinal = 0))
private void redirectRenderMain(ModelPart modelPart, MatrixStack matrices, VertexConsumer vertices, int light, int overlay) {
    Chams chams = Modules.get().get(Chams.class);
    if (chams.isActive() && chams.hand.get()) {
        Color color = chams.handColor.get();
        modelPart.render(matrices, vertices, light, overlay, color.r / 255f, color.g / 255f, color.b / 255f, color.a / 255f);
    } else {
        modelPart.render(matrices, vertices, light, overlay);
    }
}
Also used : Chams(meteordevelopment.meteorclient.systems.modules.render.Chams) Color(meteordevelopment.meteorclient.utils.render.color.Color) Redirect(org.spongepowered.asm.mixin.injection.Redirect)

Aggregations

Color (meteordevelopment.meteorclient.utils.render.color.Color)26 Chams (meteordevelopment.meteorclient.systems.modules.render.Chams)6 SettingColor (meteordevelopment.meteorclient.utils.render.color.SettingColor)6 Redirect (org.spongepowered.asm.mixin.injection.Redirect)5 EventHandler (meteordevelopment.orbit.EventHandler)3 PlayerEntity (net.minecraft.entity.player.PlayerEntity)3 TextColor (net.minecraft.text.TextColor)3 Ambience (meteordevelopment.meteorclient.systems.modules.world.Ambience)2 Text (net.minecraft.text.Text)2 MeteorRoundedGuiTheme (anticope.rejects.gui.themes.rounded.MeteorRoundedGuiTheme)1 MeteorGuiTheme (meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)1 ShapeMode (meteordevelopment.meteorclient.renderer.ShapeMode)1 Friend (meteordevelopment.meteorclient.systems.friends.Friend)1 Module (meteordevelopment.meteorclient.systems.modules.Module)1 Framebuffer (net.minecraft.client.gl.Framebuffer)1 ModelPart (net.minecraft.client.model.ModelPart)1 AbstractClientPlayerEntity (net.minecraft.client.network.AbstractClientPlayerEntity)1 ClientPlayerEntity (net.minecraft.client.network.ClientPlayerEntity)1 GameRenderer (net.minecraft.client.render.GameRenderer)1 PlayerEntityRenderer (net.minecraft.client.render.entity.PlayerEntityRenderer)1