From 64661d968f66b20071d2d3726505928613989e24 Mon Sep 17 00:00:00 2001 From: onixiya1337 <47077455+onixiya1337@users.noreply.github.com> Date: Mon, 11 Dec 2023 23:11:29 +0100 Subject: [PATCH] Fixed nullptr crash --- src/main/java/baritone/pathing/path/PathExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index b5e50f6..d2a1082 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -86,7 +86,9 @@ public boolean onTick() { } Tuple status = closestPathPos(path); - boolean isInJumpBoost = ctx.player().getActivePotionEffect(Potion.jump).getAmplifier() > 0 && !ctx.player().onGround; + boolean isInJumpBoost = ctx.player().getActivePotionEffects() != null + && ctx.player().getActivePotionEffect(Potion.jump) != null + && ctx.player().getActivePotionEffect(Potion.jump).getAmplifier() > 0 && !ctx.player().onGround; if (!isInJumpBoost && possiblyOffPath(status, BaritoneAPI.getSettings().maxDistFromPath.value)) { ticksAway++;