diff --git a/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/DiskDrivePeripheral.java b/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/DiskDrivePeripheral.java index 33459ee6e..8ce51ddda 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/DiskDrivePeripheral.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/DiskDrivePeripheral.java @@ -62,9 +62,9 @@ public class DiskDrivePeripheral implements IPeripheral { case 0: { - // isPresent + // isDiskPresent return new Object[] { - m_diskDrive.getDiskStack() != null + !m_diskDrive.getDiskStack().isEmpty() }; } case 1: 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 664701ac4..7f5926c4c 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/diskdrive/TileDiskDrive.java @@ -422,6 +422,7 @@ public class TileDiskDrive extends TilePeripheralBase return new DiskDrivePeripheral( this ); } + @Nonnull public ItemStack getDiskStack() { synchronized( this ) diff --git a/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java b/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java index 81dd189a2..3d1f0264b 100644 --- a/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java +++ b/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java @@ -154,7 +154,8 @@ public abstract class ComputerCraftProxyCommon implements IComputerCraftProxy packet.m_dataInt = new int[] { pos.getX(), pos.getY(), pos.getZ() }; } - ComputerCraft.sendToAllPlayers( packet ); + NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint( world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64 ); + ComputerCraft.sendToAllAround( packet, point ); } @Override