Skip to content

Commit

Permalink
fix: crash on insertGlobalPos null
Browse files Browse the repository at this point in the history
Closes #906
  • Loading branch information
klikli-dev committed Mar 25, 2023
1 parent 08ae0d5 commit 8f2b124
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public void tick() {
protected BlockEntity findClosestStorageProxy() {
Level level = this.entity.level;
List<BlockPos> allBlocks = new ArrayList<>();

if(this.job.getManagedMachine() == null || this.job.getManagedMachine().insertGlobalPos == null)
return null;

BlockPos machinePosition = this.job.getManagedMachine().insertGlobalPos.getPos();

//get work area, but only half height, we don't need full.
Expand Down

0 comments on commit 8f2b124

Please sign in to comment.