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