Exemplo n.º 1
0
        public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            if (!byPlayer.Entity.Controls.Sneak)
            {
                BELantern bel = world.BlockAccessor.GetBlockEntity(blockSel.Position) as BELantern;
                bel.Interact(byPlayer);
                return(true);
            }

            return(base.OnBlockInteractStart(world, byPlayer, blockSel));
        }
Exemplo n.º 2
0
        public override bool OnBlockInteractStart(IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            if (!byPlayer.Entity.Controls.Sneak)
            {
                BELantern bel = world.BlockAccessor.GetBlockEntity(blockSel.Position) as BELantern;
                if (bel.Interact(byPlayer))
                {
                    return(true);
                }
                // if Interact returned false, the player had an empty slot so revert to base: right-click pickup
            }

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