public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            BlockEntityFarmland befarmland = world.BlockAccessor.GetBlockEntity(blockSel.Position.DownCopy()) as BlockEntityFarmland;
            if (befarmland != null && befarmland.OnBlockInteract(byPlayer)) return true;

            BEBehaviorFruiting bef = world.BlockAccessor.GetBlockEntity(blockSel.Position)?.GetBehavior<BEBehaviorFruiting>();
            if (bef != null) return true;  //Move to BlockInteractStep

            return base.OnBlockInteractStart(world, byPlayer, blockSel);
        }
示例#2
0
        public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            BlockEntityFarmland befarmland = world.BlockAccessor.GetBlockEntity(blockSel.Position) as BlockEntityFarmland;

            if (befarmland != null && befarmland.OnBlockInteract(byPlayer))
            {
                return(true);
            }

            return(base.OnBlockInteractStart(world, byPlayer, blockSel));
        }