Skip to content

Commit

Permalink
Remove chunkloads when pylon is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahwinsley committed May 23, 2022
1 parent 123b4ce commit e924622
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ public void handleWorkPacket() {
shouldWork = !shouldWork;
this.setChanged();
this.level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 2);

if (!shouldWork) removeChunkloads();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ public void removeChunkloads() {
}
}

@Override
public void handleWorkPacket() {
super.handleWorkPacket();
if (!shouldWork && level instanceof ServerLevel serverLevel) {
SpawnManager.unregister(serverLevel, worldPosition);
}
}

@Override
public void setChanged() {
super.setChanged();
Expand Down

0 comments on commit e924622

Please sign in to comment.