diff --git a/src/main/java/com/minelittlepony/unicopia/client/BatEyesApplicator.java b/src/main/java/com/minelittlepony/unicopia/client/BatEyesApplicator.java index 47220180..fae8e8f7 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/BatEyesApplicator.java +++ b/src/main/java/com/minelittlepony/unicopia/client/BatEyesApplicator.java @@ -6,7 +6,6 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.entity.player.PlayerEntity; public class BatEyesApplicator { @@ -23,13 +22,10 @@ public class BatEyesApplicator { return initial; } - - // TODO: Do we need this? public void enable() { - if (client.world != null) { - PlayerEntity player = client.player; - if (!player.hasStatusEffect(StatusEffects.NIGHT_VISION) && EquinePredicates.PLAYER_BAT.test(player)) { - player.addStatusEffect(new StatusEffectInstance(StatusEffects.NIGHT_VISION, 1, 1, false, false)); + if (client.world != null && client.player != null) { + if (!client.player.hasStatusEffect(StatusEffects.NIGHT_VISION) && EquinePredicates.PLAYER_BAT.test(client.player)) { + client.player.addStatusEffect(new StatusEffectInstance(StatusEffects.NIGHT_VISION, -1, 1, false, false)); batEyesApplied = true; } }