Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jun 13, 2023
1 parent da294d4 commit b56fa39
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public SchrodingerCubeEntity(EntityType<? extends PathfinderMob> type, Level wor

@Override
public SchrodingerCubeEntity getConnection() {
return level.getNearestEntity(
return Objects.requireNonNullElse(level.getNearestEntity(
SchrodingerCubeEntity.class,
TargetingConditions.forNonCombat()
.selector(e -> Objects.equals(e.getCustomName(), getCustomName()))
Expand All @@ -25,7 +25,7 @@ public SchrodingerCubeEntity getConnection() {
this,
getX(), getY(), getZ(),
AABB.ofSize(position(), 50, 50, 50)
);
), this);
}

}

0 comments on commit b56fa39

Please sign in to comment.