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;
}
}
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);
}
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);
}
}
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);
}
}
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);
}
}
Aggregations