1
0
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:
Jonathan Coates 2022-05-28 09:23:23 +01:00
parent ab22726883
commit 3b6cd783cb
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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