Un-invert if.
This commit is contained in:
@@ -85,17 +85,7 @@ public final class ComputerBlock extends HorizontalBlock {
|
||||
|
||||
final ComputerTileEntity computer = (ComputerTileEntity) tileEntity;
|
||||
final ItemStack heldItem = player.getHeldItem(hand);
|
||||
if (!Wrenches.isWrench(heldItem)) {
|
||||
if (player.isSneaking()) {
|
||||
if (!world.isRemote()) {
|
||||
computer.start();
|
||||
}
|
||||
} else {
|
||||
if (world.isRemote()) {
|
||||
openTerminalScreen(computer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Wrenches.isWrench(heldItem)) {
|
||||
if (!world.isRemote() && player instanceof ServerPlayerEntity) {
|
||||
final ServerPlayerEntity serverPlayer = (ServerPlayerEntity) player;
|
||||
if (player.isSneaking()) {
|
||||
@@ -105,6 +95,16 @@ public final class ComputerBlock extends HorizontalBlock {
|
||||
openContainerScreen(computer, serverPlayer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (player.isSneaking()) {
|
||||
if (!world.isRemote()) {
|
||||
computer.start();
|
||||
}
|
||||
} else {
|
||||
if (world.isRemote()) {
|
||||
openTerminalScreen(computer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user