修复一个意外的NPE错误

This commit is contained in:
17146 2024-09-14 22:10:02 +08:00
parent eb59eeb271
commit ee821b9fc9

View file

@ -113,6 +113,8 @@ public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnDa
@Nullable @Nullable
protected EntityResult findEntityOnPath(Vec3 startVec, Vec3 endVec) { protected EntityResult findEntityOnPath(Vec3 startVec, Vec3 endVec) {
if (this.shooter == null) return null;
Vec3 hitVec = null; Vec3 hitVec = null;
Entity hitEntity = null; Entity hitEntity = null;
boolean headshot = false; boolean headshot = false;