1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-07 20:42:53 +00:00

Add a couple more modem methods for back compat

This commit is contained in:
SquidDev 2018-12-10 08:26:46 +00:00
parent f765b6a487
commit 97c2421a22
2 changed files with 17 additions and 2 deletions

View File

@ -39,6 +39,20 @@ public abstract class ModemPeripheral implements IPeripheral, IPacketSender, IPa
return m_state; return m_state;
} }
@Deprecated
public boolean pollChanged()
{
// Only for backwards compatibiliy
return m_state.pollChanged();
}
@Deprecated
public boolean isActive()
{
// Only for backwards compatibiliy
return m_state.isOpen();
}
private synchronized void setNetwork( IPacketNetwork network ) private synchronized void setNetwork( IPacketNetwork network )
{ {
if( m_network == network ) return; if( m_network == network ) return;

View File

@ -24,6 +24,7 @@ public abstract class WirelessModemPeripheral extends ModemPeripheral
@Deprecated @Deprecated
public WirelessModemPeripheral( boolean advanced ) public WirelessModemPeripheral( boolean advanced )
{ {
// Only for backwards compatibiliy
this( new ModemState(), advanced ); this( new ModemState(), advanced );
} }
@ -32,7 +33,7 @@ public abstract class WirelessModemPeripheral extends ModemPeripheral
{ {
return m_advanced; return m_advanced;
} }
@Override @Override
public double getRange() public double getRange()
{ {
@ -62,7 +63,7 @@ public abstract class WirelessModemPeripheral extends ModemPeripheral
return 0.0; return 0.0;
} }
} }
@Override @Override
protected IPacketNetwork getNetwork() protected IPacketNetwork getNetwork()
{ {