blob: d8cb05c53de1d5b55614c53fe500bf4216a9561b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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();
}
}
|