OnPlayerInteract() public method

public OnPlayerInteract ( float secondsUsed, IPlayer player, Vec3d hit ) : bool
secondsUsed float
player IPlayer
hit Vec3d
return bool
コード例 #1
0
        public override bool OnBlockInteractStep(float secondsUsed, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            BEBehaviorFruiting bef = world.BlockAccessor.GetBlockEntity(blockSel.Position)?.GetBehavior<BEBehaviorFruiting>();
            if (bef != null) return bef.OnPlayerInteract(secondsUsed, byPlayer, blockSel.HitPosition);

            return base.OnBlockInteractStep(secondsUsed, world, byPlayer, blockSel);
        }