1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-28 23:10:47 +00:00

Fix .isDiskPresent() always reporting true

We were still determining if the stack was null, but post-1.11 this will
never be the case.
This commit is contained in:
SquidDev 2018-03-29 11:36:59 +01:00
parent 1ef7c8e8db
commit f9761388b1
2 changed files with 3 additions and 2 deletions

View File

@ -62,9 +62,9 @@ public class DiskDrivePeripheral implements IPeripheral
{ {
case 0: case 0:
{ {
// isPresent // isDiskPresent
return new Object[] { return new Object[] {
m_diskDrive.getDiskStack() != null !m_diskDrive.getDiskStack().isEmpty()
}; };
} }
case 1: case 1:

View File

@ -423,6 +423,7 @@ public class TileDiskDrive extends TilePeripheralBase
return new DiskDrivePeripheral( this ); return new DiskDrivePeripheral( this );
} }
@Nonnull
public ItemStack getDiskStack() public ItemStack getDiskStack()
{ {
synchronized( this ) synchronized( this )