Search in sources :

Example 16 with ModifyArgs

use of org.spongepowered.asm.mixin.injection.ModifyArgs in project Carpet-TCTC-Addition by The-Cat-Town-Craft.

the class MixinFireworkRocketEntity method modifiedFireworkRocketSpeed.

@ModifyArgs(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/Vec3;add(DDD)Lnet/minecraft/world/phys/Vec3;", ordinal = 0))
private void modifiedFireworkRocketSpeed(Args args) {
    Vec3 angle = attachedToEntity.getLookAngle();
    Vec3 movement = attachedToEntity.getDeltaMovement();
    double fireworkSpeedupCoefficient = CarpetTCTCAdditionSettings.fireworkSpeedupCoefficient;
    args.set(0, angle.x * 0.1D + (angle.x * fireworkSpeedupCoefficient - movement.x) * 0.5D);
    args.set(1, angle.y * 0.1D + (angle.y * fireworkSpeedupCoefficient - movement.y) * 0.5D);
    args.set(2, angle.z * 0.1D + (angle.z * fireworkSpeedupCoefficient - movement.z) * 0.5D);
}
Also used : Vec3(net.minecraft.world.phys.Vec3) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Example 17 with ModifyArgs

use of org.spongepowered.asm.mixin.injection.ModifyArgs in project meteor-client by MeteorDevelopment.

the class EntityMixin method onPushAwayFrom.

@ModifyArgs(method = "pushAwayFrom(Lnet/minecraft/entity/Entity;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;addVelocity(DDD)V"))
private void onPushAwayFrom(Args args) {
    Velocity velocity = Modules.get().get(Velocity.class);
    if ((Object) this == mc.player && velocity.isActive() && velocity.entityPush.get()) {
        double multiplier = velocity.entityPushAmount.get();
        args.set(0, (double) args.get(0) * multiplier);
        args.set(2, (double) args.get(2) * multiplier);
    }
}
Also used : Velocity(meteordevelopment.meteorclient.systems.modules.movement.Velocity) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Example 18 with ModifyArgs

use of org.spongepowered.asm.mixin.injection.ModifyArgs in project SpeedRunIGT by RedLime.

the class PlayerAdvancementTrackerMixin method getCriteria.

@ModifyArgs(method = "endTrackingCompleted", at = @At(value = "INVOKE", target = "Lnet/minecraft/advancement/criterion/Criterion$ConditionsContainer;<init>(Lnet/minecraft/advancement/criterion/CriterionConditions;Lnet/minecraft/advancement/Advancement;Ljava/lang/String;)V"))
private void getCriteria(Args args) {
    Advancement advancement = args.get(1);
    String criteriaKey = args.get(2);
    if (InGameTimer.getInstance().getStatus() != TimerStatus.NONE) {
        InGameTimer.getInstance().tryInsertNewAdvancement(advancement.getId().toString(), criteriaKey);
    }
}
Also used : Advancement(net.minecraft.advancement.Advancement) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Example 19 with ModifyArgs

use of org.spongepowered.asm.mixin.injection.ModifyArgs in project Hytilities-Reborn by W-OVERFLOW.

the class VertexLighterFlatMixin method modifyArgs.

@ModifyArgs(method = "processQuad", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/model/pipeline/VertexLighterFlat;updateColor([F[FFFFFI)V"))
private void modifyArgs(Args args) {
    int height = HeightHandler.INSTANCE.getHeight();
    if (height == -1)
        return;
    if (HytilsConfig.heightOverlay && blockInfo.getBlockPos().getY() == (height - 1) && blockInfo.getBlock() instanceof BlockColored) {
        MapColor mapColor = blockInfo.getBlock().getMapColor(blockInfo.getWorld().getBlockState(blockInfo.getBlockPos()));
        boolean isClay = blockInfo.getBlock().getMaterial() == Material.rock;
        if (!isClay || check(mapColor.colorIndex)) {
            args.set(5, 1.0F);
            args.set(6, (HytilsConfig.manuallyEditHeightOverlay ? BlockHighlightConfig.colorMap.get(mapColor).get().getRGB() : ColorUtils.getCachedDarkColor(mapColor.colorValue)));
        }
    }
}
Also used : BlockColored(net.minecraft.block.BlockColored) MapColor(net.minecraft.block.material.MapColor) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Example 20 with ModifyArgs

use of org.spongepowered.asm.mixin.injection.ModifyArgs in project Client by MatHax.

the class ComeCommandMixin method getComeCommandTarget.

@ModifyArgs(method = "execute", at = @At(value = "INVOKE", target = "Lbaritone/api/process/ICustomGoalProcess;setGoalAndPath(Lbaritone/api/pathing/goals/Goal;)V"), remap = false)
private void getComeCommandTarget(Args args) {
    Freecam freecam = Modules.get().get(Freecam.class);
    if (freecam.isActive()) {
        float tickDelta = mc.getTickDelta();
        args.set(0, new GoalBlock((int) freecam.getX(tickDelta), (int) freecam.getY(tickDelta), (int) freecam.getZ(tickDelta)));
    }
}
Also used : GoalBlock(baritone.api.pathing.goals.GoalBlock) Freecam(mathax.client.systems.modules.render.Freecam) ModifyArgs(org.spongepowered.asm.mixin.injection.ModifyArgs)

Aggregations

ModifyArgs (org.spongepowered.asm.mixin.injection.ModifyArgs)27 Chams (mathax.client.systems.modules.render.Chams)3 Freecam (mathax.client.systems.modules.render.Freecam)3 Chams (meteordevelopment.meteorclient.systems.modules.render.Chams)3 Freecam (meteordevelopment.meteorclient.systems.modules.render.Freecam)3 GoalBlock (baritone.api.pathing.goals.GoalBlock)2 BlockColored (net.minecraft.block.BlockColored)2 MapColor (net.minecraft.block.material.MapColor)2 ItemStack (net.minecraft.item.ItemStack)2 Identifier (net.minecraft.util.Identifier)2 Freecam (dev.hypnotic.module.render.Freecam)1 IConfigBase (fi.dy.masa.malilib.config.IConfigBase)1 IHotkeyTogglable (fi.dy.masa.malilib.config.IHotkeyTogglable)1 ConfigOptionChangeListenerButton (fi.dy.masa.malilib.config.gui.ConfigOptionChangeListenerButton)1 ConfigBooleanHotkeyed (fi.dy.masa.malilib.config.options.ConfigBooleanHotkeyed)1 GuiConfigsBase (fi.dy.masa.malilib.gui.GuiConfigsBase)1 ButtonGeneric (fi.dy.masa.malilib.gui.button.ButtonGeneric)1 ConfigButtonBoolean (fi.dy.masa.malilib.gui.button.ConfigButtonBoolean)1 ConfigButtonKeybind (fi.dy.masa.malilib.gui.button.ConfigButtonKeybind)1 IKeybindConfigGui (fi.dy.masa.malilib.gui.interfaces.IKeybindConfigGui)1