diff --git a/src/main/java/li/cil/oc2/common/block/ComputerBlock.java b/src/main/java/li/cil/oc2/common/block/ComputerBlock.java index 34f619e5..368e2ede 100644 --- a/src/main/java/li/cil/oc2/common/block/ComputerBlock.java +++ b/src/main/java/li/cil/oc2/common/block/ComputerBlock.java @@ -96,10 +96,16 @@ public final class ComputerBlock extends HorizontalBlock { } } } else { - if (world.isRemote()) { - openTerminalScreen(computer); + if (player.isSneaking()) { + if (!world.isRemote()) { + computer.start(); + } } else { - computer.start(); + if (world.isRemote()) { + openTerminalScreen(computer); + } else { + computer.start(); + } } } diff --git a/src/main/java/li/cil/oc2/common/block/entity/ComputerTileEntity.java b/src/main/java/li/cil/oc2/common/block/entity/ComputerTileEntity.java index 7d5a2c52..a68c3a77 100644 --- a/src/main/java/li/cil/oc2/common/block/entity/ComputerTileEntity.java +++ b/src/main/java/li/cil/oc2/common/block/entity/ComputerTileEntity.java @@ -134,6 +134,11 @@ public final class ComputerTileEntity extends AbstractTileEntity implements ITic return; } + final World world = getWorld(); + if (world == null || world.isRemote()) { + return; + } + setBootError(null); setRunState(RunState.LOADING_DEVICES); loadDevicesDelay = 0; @@ -144,6 +149,11 @@ public final class ComputerTileEntity extends AbstractTileEntity implements ITic return; } + final World world = getWorld(); + if (world == null || world.isRemote()) { + return; + } + if (runState == RunState.LOADING_DEVICES) { setRunState(RunState.STOPPED); return;