Search in sources :

Example 1 with Chams

use of meteordevelopment.meteorclient.systems.modules.render.Chams in project meteor-client by MeteorDevelopment.

the class LivingEntityRendererMixin method modifyScale.

// Player chams
@ModifyArgs(method = "render(Lnet/minecraft/entity/LivingEntity;FFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;scale(FFF)V"))
private void modifyScale(Args args, T livingEntity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
    Chams module = Modules.get().get(Chams.class);
    if (!module.isActive() || !module.players.get() || !(livingEntity instanceof PlayerEntity))
        return;
    if (module.ignoreSelf.get() && livingEntity == mc.player)
        return;
    args.set(0, -module.playersScale.get().floatValue());
    args.set(1, -module.playersScale.get().floatValue());
    args.set(2, module.playersScale.get().floatValue());
}
Also used : Chams(meteordevelopment.meteorclient.systems.modules.render.Chams) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ClientPlayerEntity(net.minecraft.client.network.ClientPlayerEntity)

Example 2 with Chams

use of meteordevelopment.meteorclient.systems.modules.render.Chams 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)

Example 3 with Chams

use of meteordevelopment.meteorclient.systems.modules.render.Chams 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 Chams

use of meteordevelopment.meteorclient.systems.modules.render.Chams 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 Chams

use of meteordevelopment.meteorclient.systems.modules.render.Chams in project meteor-client by MeteorDevelopment.

the class EndCrystalEntityRendererMixin method modifySpeed.

// Rotation speed
@ModifyArgs(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/util/math/Vec3f;getDegreesQuaternion(F)Lnet/minecraft/util/math/Quaternion;"))
private void modifySpeed(Args args) {
    Chams module = Modules.get().get(Chams.class);
    if (!module.isActive() || !module.crystals.get())
        return;
    args.set(0, ((float) args.get(0)) * module.crystalsRotationSpeed.get().floatValue());
}
Also used : Chams(meteordevelopment.meteorclient.systems.modules.render.Chams) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Aggregations

Chams (meteordevelopment.meteorclient.systems.modules.render.Chams)14 Color (meteordevelopment.meteorclient.utils.render.color.Color)6 Redirect (org.spongepowered.asm.mixin.injection.Redirect)6 ModifyArgs (org.spongepowered.asm.mixin.injection.ModifyArgs)3 ClientPlayerEntity (net.minecraft.client.network.ClientPlayerEntity)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 Identifier (net.minecraft.util.Identifier)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1