aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
diff options
context:
space:
mode:
authoringle <inglettronald@gmail.com>2022-11-28 10:14:44 -0600
committeringle <inglettronald@gmail.com>2022-11-28 10:14:44 -0600
commit15b61517c59f8aa8135af82d6814739ad5da76b3 (patch)
tree19a13669ba1714cf9f763d632fafcfc6382eec54 /src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
parent7df387ec0f015fc7b8179131f17a107be4d77f04 (diff)
downloadDulkirMod-15b61517c59f8aa8135af82d6814739ad5da76b3.tar.gz
DulkirMod-15b61517c59f8aa8135af82d6814739ad5da76b3.tar.bz2
DulkirMod-15b61517c59f8aa8135af82d6814739ad5da76b3.zip
- 1.1.3
Diffstat (limited to 'src/main/java/dulkirmod/mixins/MixinEntityRenderer.java')
-rw-r--r--src/main/java/dulkirmod/mixins/MixinEntityRenderer.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
new file mode 100644
index 0000000..d8cb05c
--- /dev/null
+++ b/src/main/java/dulkirmod/mixins/MixinEntityRenderer.java
@@ -0,0 +1,18 @@
+package dulkirmod.mixins;
+
+import dulkirmod.features.HurtCamSlider;
+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;
+
+@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();
+ }
+}