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); }
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)); }