2020-10-05 12:40:06 +02:00
|
|
|
package io.gitlab.jfronny.slyde.mixin;
|
|
|
|
|
2021-06-08 20:08:42 +02:00
|
|
|
import net.minecraft.client.option.DoubleOption;
|
2020-10-05 12:40:06 +02:00
|
|
|
import org.spongepowered.asm.mixin.Mixin;
|
2021-06-08 20:08:42 +02:00
|
|
|
import org.spongepowered.asm.mixin.injection.At;
|
|
|
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
2020-10-05 12:40:06 +02:00
|
|
|
|
|
|
|
@Mixin(DoubleOption.class)
|
|
|
|
public class DoubleOptionMixin {
|
2021-06-08 20:08:42 +02:00
|
|
|
@Redirect(method = "getRatio(D)D", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;clamp(DDD)D"))
|
|
|
|
private double getRatioClamp(double value, double min, double max) {
|
|
|
|
return value;
|
2020-10-05 12:40:06 +02:00
|
|
|
}
|
2021-06-08 20:08:42 +02:00
|
|
|
|
|
|
|
@Redirect(method = "getValue(D)D", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;clamp(DDD)D"))
|
|
|
|
private double getValueClamp(double value, double min, double max) {
|
|
|
|
return value;
|
2020-10-05 12:40:06 +02:00
|
|
|
}
|
2021-06-08 20:08:42 +02:00
|
|
|
|
|
|
|
@Redirect(method = "adjust(D)D", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/MathHelper;clamp(DDD)D"))
|
|
|
|
private double adjustClamp(double value, double min, double max) {
|
2020-10-05 12:40:06 +02:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}
|