diff --git a/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java b/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java index 3f97e224a..4f29f067e 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java @@ -442,7 +442,7 @@ private synchronized void unmountDisk( IComputerAccess computer ) private void updateBlockState() { - if( remove ) return; + if( remove || level == null ) return; if( !diskStack.isEmpty() ) { diff --git a/src/main/java/dan200/computercraft/shared/peripheral/printer/TilePrinter.java b/src/main/java/dan200/computercraft/shared/peripheral/printer/TilePrinter.java index 02d0693c2..cbd00bf33 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/printer/TilePrinter.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/printer/TilePrinter.java @@ -438,7 +438,7 @@ private void updateBlockState() private void updateBlockState( boolean top, boolean bottom ) { - if( remove ) return; + if( remove || level == null ) return; BlockState state = getBlockState(); if( state.getValue( BlockPrinter.TOP ) == top & state.getValue( BlockPrinter.BOTTOM ) == bottom ) return;