mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 20:20:30 +00:00
Don't allow modems to be used in adventure mode
This (along with computer locking) should be Good Enough for BlanketCon.
This commit is contained in:
parent
ab22726883
commit
3b6cd783cb
@ -262,7 +262,7 @@ public class TileCable extends TileGeneric
|
||||
@Override
|
||||
public ActionResultType onActivate( PlayerEntity player, Hand hand, BlockRayTraceResult hit )
|
||||
{
|
||||
if( player.isCrouching() ) return ActionResultType.PASS;
|
||||
if( player.isCrouching() || !player.mayBuild() ) return ActionResultType.PASS;
|
||||
if( !canAttachPeripheral() ) return ActionResultType.FAIL;
|
||||
|
||||
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
||||
|
@ -199,6 +199,7 @@ public class TileWiredModemFull extends TileGeneric
|
||||
@Override
|
||||
public ActionResultType onActivate( PlayerEntity player, Hand hand, BlockRayTraceResult hit )
|
||||
{
|
||||
if( player.isCrouching() || !player.mayBuild() ) return ActionResultType.PASS;
|
||||
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
||||
|
||||
// On server, we interacted if a peripheral was found
|
||||
|
Loading…
Reference in New Issue
Block a user