From ee821b9fc961d6b58ec5c3c96d45cadd02f93412 Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sat, 14 Sep 2024 22:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E6=84=8F?= =?UTF-8?q?=E5=A4=96=E7=9A=84NPE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/projectile/ProjectileEntity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java index c83c6806a..c96f93af2 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java @@ -113,6 +113,8 @@ public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnDa @Nullable protected EntityResult findEntityOnPath(Vec3 startVec, Vec3 endVec) { + if (this.shooter == null) return null; + Vec3 hitVec = null; Entity hitEntity = null; boolean headshot = false;