1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 03:00:30 +00:00

Fix all wireless modem blocks being advanced

This commit is contained in:
SquidDev 2019-01-25 00:12:49 +00:00
parent c9f05a2939
commit 709a6329c7
3 changed files with 17 additions and 1 deletions

View File

@ -15,6 +15,11 @@ import javax.annotation.Nonnull;
public class TileAdvancedModem extends TileWirelessModemBase
{
public TileAdvancedModem()
{
super( true );
}
@Override
protected EnumFacing getDirection()
{

View File

@ -24,6 +24,11 @@ import javax.annotation.Nonnull;
public class TileWirelessModem extends TileWirelessModemBase implements IDirectionalTile, ITilePeripheral
{
public TileWirelessModem()
{
super( false );
}
@Override
public EnumFacing getDirection()
{

View File

@ -22,13 +22,18 @@ import javax.annotation.Nonnull;
public abstract class TileWirelessModemBase extends TileGeneric implements IPeripheralTile
{
protected TileWirelessModemBase( boolean advanced )
{
this.advanced = advanced;
}
private static class Peripheral extends WirelessModemPeripheral
{
private final TileWirelessModemBase entity;
Peripheral( TileWirelessModemBase entity )
{
super( new ModemState( () -> TickScheduler.schedule( entity ) ), true );
super( new ModemState( () -> TickScheduler.schedule( entity ) ), entity.advanced );
this.entity = entity;
}
@ -54,6 +59,7 @@ public abstract class TileWirelessModemBase extends TileGeneric implements IPeri
}
}
private final boolean advanced;
private boolean hasModemDirection = false;
private EnumFacing modemDirection = EnumFacing.DOWN;
private final ModemPeripheral modem = new Peripheral( this );