Skip to content

Commit

Permalink
Fix incorrect mapping causing player to flash white when attacking
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Sep 15, 2021
1 parent 1c1e8fa commit 1d8ab63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Mixin(LivingEntityRenderer.class)
public abstract class MixinLivingEntityRenderer {
@Shadow
abstract float getAttackAnim(LivingEntity entity, float tickDelta);
abstract float getWhiteOverlayProgress(LivingEntity entity, float tickDelta);

@ModifyVariable(method = "render", at = @At("HEAD"))
private MultiBufferSource iris$wrapProvider(MultiBufferSource bufferSource, LivingEntity entity, float yaw,
Expand All @@ -33,7 +33,7 @@ public abstract class MixinLivingEntityRenderer {
} else {
hurt = entity.hurtTime > 0 || entity.deathTime > 0;
}
float whiteFlash = getAttackAnim(entity, tickDelta);
float whiteFlash = getWhiteOverlayProgress(entity, tickDelta);

if (hurt || whiteFlash > 0.0) {
EntityColorRenderStateShard phase = new EntityColorRenderStateShard(hurt, whiteFlash);
Expand Down

0 comments on commit 1d8ab63

Please sign in to comment.