aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dulkirmod/mixins/MixinEntityRenderer.java')
-rw-r--r--src/main/java/dulkirmod/mixins/MixinEntityRenderer.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
index f754f2c..b7099c2 100644
--- a/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
+++ b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
@@ -1,25 +1,16 @@
package dulkirmod.mixins;
-import dulkirmod.features.HurtCamSlider;
-import dulkirmod.features.ViewBobbing;
+import dulkirmod.config.DulkirConfig;
import net.minecraft.client.renderer.EntityRenderer;
import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import org.spongepowered.asm.mixin.injection.Constant;
+import org.spongepowered.asm.mixin.injection.ModifyConstant;
@Mixin(EntityRenderer.class)
public class MixinEntityRenderer {
- @Inject(method = "hurtCameraEffect", at = @At("HEAD"), cancellable = true)
- private void hurtCameraEffect(float partialTicks, CallbackInfo ci) {
- if (HurtCamSlider.INSTANCE.renderHurt(partialTicks))
- ci.cancel();
- }
-
- @Inject(method = "setupViewBobbing", at = @At("HEAD"), cancellable = true)
- private void modifyViewBobbing(float partialTicks, CallbackInfo ci) {
- if (ViewBobbing.INSTANCE.renderBob(partialTicks))
- ci.cancel();
+ @ModifyConstant(method = "hurtCameraEffect", constant = @Constant(floatValue = 14.0f))
+ private float hurtCameraEffect(float constant) {
+ return constant * DulkirConfig.INSTANCE.getHurtCamIntensity();
}
}