mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-23 00:24:49 +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:
@@ -262,7 +262,7 @@ public class TileCable extends TileGeneric
|
|||||||
@Override
|
@Override
|
||||||
public ActionResultType onActivate( PlayerEntity player, Hand hand, BlockRayTraceResult hit )
|
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( !canAttachPeripheral() ) return ActionResultType.FAIL;
|
||||||
|
|
||||||
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ public class TileWiredModemFull extends TileGeneric
|
|||||||
@Override
|
@Override
|
||||||
public ActionResultType onActivate( PlayerEntity player, Hand hand, BlockRayTraceResult hit )
|
public ActionResultType onActivate( PlayerEntity player, Hand hand, BlockRayTraceResult hit )
|
||||||
{
|
{
|
||||||
|
if( player.isCrouching() || !player.mayBuild() ) return ActionResultType.PASS;
|
||||||
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
if( getLevel().isClientSide ) return ActionResultType.SUCCESS;
|
||||||
|
|
||||||
// On server, we interacted if a peripheral was found
|
// On server, we interacted if a peripheral was found
|
||||||
|
|||||||
Reference in New Issue
Block a user