mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-04 12:58:07 +00:00
parent
6b364052c7
commit
fb6d65ec23
@ -359,7 +359,7 @@ public class TileCable extends TileModemBase
|
|||||||
((BlockGeneric)getBlockType()).dropItem( getWorld(), getPos(), PeripheralItemFactory.create( PeripheralType.WiredModem, getLabel(), 1 ) );
|
((BlockGeneric)getBlockType()).dropItem( getWorld(), getPos(), PeripheralItemFactory.create( PeripheralType.WiredModem, getLabel(), 1 ) );
|
||||||
setLabel( null );
|
setLabel( null );
|
||||||
setBlockState( getBlockState().withProperty( BlockCable.Properties.MODEM, BlockCableModemVariant.None ) );
|
setBlockState( getBlockState().withProperty( BlockCable.Properties.MODEM, BlockCableModemVariant.None ) );
|
||||||
modemChanged();
|
if( modemChanged() ) networkChanged();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -714,9 +714,11 @@ public class TileCable extends TileModemBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void modemChanged()
|
public boolean modemChanged()
|
||||||
{
|
{
|
||||||
if( getWorld().isRemote ) return;
|
if( getWorld().isRemote ) return false;
|
||||||
|
|
||||||
|
boolean requiresUpdate = false;
|
||||||
|
|
||||||
PeripheralType type = getPeripheralType();
|
PeripheralType type = getPeripheralType();
|
||||||
if( type == PeripheralType.Cable )
|
if( type == PeripheralType.Cable )
|
||||||
@ -727,10 +729,12 @@ public class TileCable extends TileModemBase
|
|||||||
if( type != PeripheralType.WiredModemWithCable && m_peripheralAccessAllowed )
|
if( type != PeripheralType.WiredModemWithCable && m_peripheralAccessAllowed )
|
||||||
{
|
{
|
||||||
m_peripheralAccessAllowed = false;
|
m_peripheralAccessAllowed = false;
|
||||||
|
requiresUpdate = true;
|
||||||
|
markDirty();
|
||||||
|
updateAnim();
|
||||||
}
|
}
|
||||||
|
|
||||||
markDirty();
|
return requiresUpdate;
|
||||||
updateAnim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// private stuff
|
// private stuff
|
||||||
|
Loading…
x
Reference in New Issue
Block a user