Translations:Modding:Adding Block Behavior/13/en

From Vintage Story Wiki

<syntaxhighlight lang="c#">

   public override bool OnPlayerInteract(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel, ref EnumHandling handling)
   {
       // Find the target position
       BlockPos pos = blockSel.Position.AddCopy(blockSel.Face.GetOpposite());