From 24c71e49c7570339106ee8059c0b968edbc5c6ea Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 22 Dec 2020 10:48:11 -0500 Subject: [PATCH] cleanup --- core/src/mindustry/entities/comp/HealthComp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/HealthComp.java b/core/src/mindustry/entities/comp/HealthComp.java index ca65ea8115..2b4aef0b51 100644 --- a/core/src/mindustry/entities/comp/HealthComp.java +++ b/core/src/mindustry/entities/comp/HealthComp.java @@ -51,8 +51,8 @@ abstract class HealthComp implements Entityc, Posc{ /** Damage and pierce armor. */ void damagePierce(float amount, boolean withEffect){ - if(this instanceof Shieldc){ - damage(amount + ((Shieldc)this).armor(), withEffect); + if(this instanceof Shieldc c){ + damage(amount + c.armor(), withEffect); }else{ damage(amount, withEffect); }